From f4f58b66e9d706ae291d807cfd6b5ab67e1afe54 Mon Sep 17 00:00:00 2001 From: noctuid Date: Sat, 30 Jan 2016 03:13:18 -0500 Subject: [PATCH] Escape tmux session name This will, for example, allow session names to have whitespace (not that that's a good idea, but if the session name is quoted like -s "a b", then the expected behavior is to get a session named "a b" not for tdrop to fail). --- tdrop | 1 + 1 file changed, 1 insertion(+) diff --git a/tdrop b/tdrop index f7c7128..01447fc 100755 --- a/tdrop +++ b/tdrop @@ -483,6 +483,7 @@ program_start() { local program_command tmux_command wid program_command="$program $program_flags" if [[ -n "$session_name" ]]; then + session_name=$(printf "%q" "$session_name") tmux_command="'tmux attach-session -dt $session_name || \ tmuxinator start $session_name || \ tmux new-session -s $session_name'"