From 26e77a010b56ee57cac26e8c11101702f54b9366 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 31 Jan 2026 10:15:05 +0000 Subject: [PATCH] Document {container} placeholder in README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ae3507..5f3f9e8 100644 --- a/README.md +++ b/README.md @@ -109,13 +109,19 @@ Containers that only specify `webterm-theme` are still included and use the defa **Environment Variables:** - `WEBTERM_DOCKER_USERNAME` - Set to run Docker exec sessions as a specific user (default: root) -- `WEBTERM_DOCKER_AUTO_COMMAND` - Override the default `auto` command (default: `tmux new-session -As webterm`) +- `WEBTERM_DOCKER_AUTO_COMMAND` - Override the default `auto` command (default: `/bin/bash`). Supports `{container}` placeholder for the container name. Example: Start containers and exec into them as `developer` user: ```bash WEBTERM_DOCKER_USERNAME=developer webterm --docker-watch ``` +Example: Use tmux with per-container session names: +```bash +WEBTERM_DOCKER_AUTO_COMMAND="tmux new-session -ADs {container}" webterm --docker-watch +``` +This creates a tmux session named after each container (e.g., `my-webapp`, `redis`, etc.) instead of a shared session name. + Example docker-compose.yaml: ```yaml