diff options
Diffstat (limited to 'bin/ssh-and-tmux')
-rwxr-xr-x | bin/ssh-and-tmux | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ssh-and-tmux b/bin/ssh-and-tmux index 87ace865..6f1d482e 100755 --- a/bin/ssh-and-tmux +++ b/bin/ssh-and-tmux @@ -24,7 +24,11 @@ done host="$1" session="${2:-default}" -cmd="tmux new-session -A -c \$HOME -s $session" +# Go via a login shell such that if there is no root tmux daemon yet, it ends +# up with a PATH as though the first tmux session were launched from an +# interactive shell. This affects launching programs directly from tmux +# (e.g. my C-\ e binding) for *all* sessions. +cmd="\$SHELL -l -c \"tmux new-session -A -c \$HOME -s $session\"" if [ -n "$container_name" ]; then display_host="$container_name" cmd="$(printf "$container_cmd" "$container_name") -- $cmd" |