From f242584ba34d416f8446977a5e271c2243529f69 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Wed, 22 Feb 2023 23:28:53 +0100 Subject: [PATCH] updated _ssh_or_mosh_args() (2), fixes #627 do not try to ignore the command if supplied parsing the ssh command line is brittle and people sometimes pass options after user@hostname, e.g. ssh -p 222 user@hostname -I /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so --- .tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index c1ce1df..3538f56 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -531,7 +531,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # _ssh_or_mosh_args() { # case "$1" in # *ssh*) -# args=$(printf '%s' "$1" | perl -n -e 'print if s/.*?\bssh[\w]*\s*((?:\s+-\w+)*)(\s+\w+)(\s\w+)?/\1\2/') +# args=$(printf '%s' "$1" | perl -n -e 'print if s/.*?\bssh[\w_-]*\s*(.*)/\1/') # ;; # *mosh-client*) # args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g')