Closed rodhash closed 7 months ago
Here a recording
same me~
Since I don't own a Mac I would need to see debug logs (set @ssh-split-debug
to true).
Surely I can help w/ that
Added the below lines but the file /tmp/tmux-ssh-split.log
is not being generated:
# ssh split
set-option -g @ssh-split-keep-cwd "true"
set-option -g @ssh-split-keep-remote-cwd "true"
set-option -g @ssh-split-fail "false"
set-option -g @ssh-split-no-env "false"
set-option -g @ssh-split-no-shell "false"
set-option -g @ssh-split-strip-cmd "true"
set-option -g @ssh-split-verbose "true"
set-option -g @ssh-split-debug "true"
set-option -g @ssh-split-h-key "|"
set-option -g @ssh-split-v-key "S"
set-option -g @ssh-split-w-key "C"
set -g @plugin 'pschmitt/tmux-ssh-split'
Tried reloading the tmux and even restarted the process itself by quitting and starting it again, but the log file was not generated.
It's basically behaving the same as before, the split works but I get a local shell instead of the destination VM (residing on GCP). And the log file was not created.
Do you have TMPDIR set by any chance? Cause the logfile path respects that by default.
Also since you mention gcp, are you using regular ssh to connect to your instance? Cause wrappers wouldn't be supported (yet).
TMPDIR
Oh yeah I do have this variable set .. found the log file, here it is:
+ [[ -z '' ]]
+ SPLIT_ARGS+=(-e "TMUX_SSH_SPLIT=1")
++ get_ssh_command
++ local child_cmd
++ local pane_id
++ local pane_pid
+++ get_current_pane_id
+++ get_current_pane_info
+++ tmux display -p '#{pane_id} #{pane_pid}'
+++ awk '{ print $1 }'
++ pane_id=%9
+++ get_pane_pid_from_pane_id %9
+++ tmux list-panes -F '#{pane_id} #{pane_pid}'
+++ awk '/^%9 / { print $2}'
++ pane_pid=75937
++ [[ -z 75937 ]]
++ local host
++ get_child_cmds 75937
++ local pid=75937
++ read -r child_cmd
+++ uname -s
++ [[ Darwin == \D\a\r\w\i\n ]]
++ ps -o pid=,ppid=,command=
++ grep --color=never 75937
++ awk '{$1="";$2="";print $0}'
++ is_ssh_or_mosh_command -zsh
++ is_ssh_command -zsh
++ [[ -zsh =~ ^(auto)?ssh ]]
++ is_mosh_command -zsh
++ grep -qE '(mosh)|(mosh-client) '
++ return 0
++ read -r child_cmd
++ is_ssh_or_mosh_command '/usr/bin/ssh vm1'
++ is_ssh_command '/usr/bin/ssh vm1'
++ [[ /usr/bin/ssh vm1 =~ ^(auto)?ssh ]]
++ is_mosh_command '/usr/bin/ssh vm1'
++ grep -qE '(mosh)|(mosh-client) '
++ read -r child_cmd
++ return 1
+ SSH_COMMAND=
+ [[ -z '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ tmux split -c /Users/noob -h -e TMUX_SSH_SPLIT=1
+ exit 0
+ [[ -z '' ]]
+ SPLIT_ARGS+=(-e "TMUX_SSH_SPLIT=1")
++ get_ssh_command
++ local child_cmd
++ local pane_id
++ local pane_pid
+++ get_current_pane_id
+++ get_current_pane_info
+++ tmux display -p '#{pane_id} #{pane_pid}'
+++ awk '{ print $1 }'
++ pane_id=%0
+++ get_pane_pid_from_pane_id %0
+++ tmux list-panes -F '#{pane_id} #{pane_pid}'
+++ awk '/^%0 / { print $2}'
++ pane_pid=78488
++ [[ -z 78488 ]]
++ local host
++ get_child_cmds 78488
++ local pid=78488
++ read -r child_cmd
+++ uname -s
++ [[ Darwin == \D\a\r\w\i\n ]]
++ ps -o pid=,ppid=,command=
++ grep --color=never 78488
++ awk '{$1="";$2="";print $0}'
++ is_ssh_or_mosh_command -zsh
++ is_ssh_command -zsh
++ [[ -zsh =~ ^(auto)?ssh ]]
++ is_mosh_command -zsh
++ grep -qE '(mosh)|(mosh-client) '
++ return 0
++ read -r child_cmd
++ is_ssh_or_mosh_command '/usr/bin/ssh vm1'
++ is_ssh_command '/usr/bin/ssh vm1'
++ [[ /usr/bin/ssh vm1 =~ ^(auto)?ssh ]]
++ is_mosh_command '/usr/bin/ssh vm1'
++ grep -qE '(mosh)|(mosh-client) '
++ read -r child_cmd
++ return 1
+ SSH_COMMAND=
+ [[ -z '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ tmux split -c /Users/noob -h -e TMUX_SSH_SPLIT=1
+ exit 0
+ [[ -z '' ]]
+ SPLIT_ARGS+=(-e "TMUX_SSH_SPLIT=1")
++ get_ssh_command
++ local child_cmd
++ local pane_id
++ local pane_pid
+++ get_current_pane_id
+++ get_current_pane_info
+++ tmux display -p '#{pane_id} #{pane_pid}'
+++ awk '{ print $1 }'
++ pane_id=%0
+++ get_pane_pid_from_pane_id %0
+++ tmux list-panes -F '#{pane_id} #{pane_pid}'
+++ awk '/^%0 / { print $2}'
++ pane_pid=80416
++ [[ -z 80416 ]]
++ local host
++ get_child_cmds 80416
++ local pid=80416
++ read -r child_cmd
+++ uname -s
++ [[ Darwin == \D\a\r\w\i\n ]]
++ ps -o pid=,ppid=,command=
++ grep --color=never 80416
++ awk '{$1="";$2="";print $0}'
++ is_ssh_or_mosh_command -zsh
++ is_ssh_command -zsh
++ [[ -zsh =~ ^(auto)?ssh ]]
++ is_mosh_command -zsh
++ grep -qE '(mosh)|(mosh-client) '
++ return 0
++ read -r child_cmd
++ is_ssh_or_mosh_command '/usr/bin/ssh vm1'
++ is_ssh_command '/usr/bin/ssh vm1'
++ [[ /usr/bin/ssh vm1 =~ ^(auto)?ssh ]]
++ is_mosh_command '/usr/bin/ssh vm1'
++ grep -qE '(mosh)|(mosh-client) '
++ read -r child_cmd
++ return 1
+ SSH_COMMAND=
+ [[ -z '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ tmux split -c /Users/noob -h -e TMUX_SSH_SPLIT=1
+ exit 0
Also since you mention gcp, are you using regular ssh to connect to your instance? Cause wrappers wouldn't be supported (yet).
yep, just ssh. I also have SSH multiplexing set but the initial connection is just SSH.
Thanks for the logfile.
Should be a simple fix:
[[ "$1" =~ ^(auto)?ssh ]]
does not match /usr/bin/ssh xxx
Please try the latest main commit
Awesome, it's working now
Hi
It seems to not be working for me, I found one past issue for Mac but it seems to be fixed by now.
I've installed successfully, so if running again prefix + I this is what I get:
As for the settings I'm using this .. its a copy/paste from the README.
Pressing the Prefix + any of these 3 keys above while in a remote SSH connection, it opens up a new pane but locally and not in the remote SSH server.
Am I missing something?