From c6bab99f051c73c5ba3879751f25bb66c4c6be0d Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Tue, 2 Nov 2021 14:21:55 +0100 Subject: [PATCH] updated _ssh_or_mosh_args() relaxed the regex to accommodate for renamed ssh clients and to ignore the command if supplied --- .tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 48f0117..5a6b808 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -550,7 +550,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\b\s+(.*)/\2/') +# args=$(printf '%s' "$1" | perl -n -e 'print if s/.*?\bssh[\w]*\s*((?:\s+-\w+)*)(\s+\w+)(\s\w+)?/\1\2/') # ;; # *mosh-client*) # args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g')