o: sanitize agent name for tmux session too
Agent names like src:ollie need colon replaced with dash.
This commit is contained in:
parent
9b063a24ce
commit
1d688d9944
|
|
@ -392,10 +392,12 @@ cmd_tui() {
|
||||||
|
|
||||||
local s="$CTX_SESSION"
|
local s="$CTX_SESSION"
|
||||||
local a="$CTX_AGENT"
|
local a="$CTX_AGENT"
|
||||||
# Sanitize session name for tmux (replace / and : with -)
|
# Sanitize session and agent names for tmux (replace / and : with -)
|
||||||
local safe_session="${s//\//-}"
|
local safe_session="${s//\//-}"
|
||||||
safe_session="${safe_session//:/-}"
|
safe_session="${safe_session//:/-}"
|
||||||
local tmux_session="o-${safe_session}-${a}"
|
local safe_agent="${a//\//-}"
|
||||||
|
safe_agent="${safe_agent//:/-}"
|
||||||
|
local tmux_session="o-${safe_session}-${safe_agent}"
|
||||||
|
|
||||||
# Check for subcommands
|
# Check for subcommands
|
||||||
if [[ "${1:-}" == "exit" ]]; then
|
if [[ "${1:-}" == "exit" ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue