1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

replaced awk by perl in _ssh_or_mosh_args() to benefit from word boundary anchors, closes #363

This commit is contained in:
Gregory Pakosz 2020-09-16 21:03:08 +02:00
parent 8976729f4f
commit 3c09b78aa6

View file

@ -545,7 +545,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# _ssh_or_mosh_args() { # _ssh_or_mosh_args() {
# case "$1" in # case "$1" in
# *ssh*) # *ssh*)
# args=$(printf '%s' "$1" | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1 = ""; print $0; exit }') # args=$(printf '%s' "$1" | perl -n -e 'print if s/(.*?)\bssh\b\s+(.*)/\2/')
# ;; # ;;
# *mosh-client*) # *mosh-client*)
# args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g') # args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g')