Skip to content

Commit

Permalink
updated _ssh_or_mosh_args() (2), fixes gpakosz#627
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gpakosz committed Feb 23, 2023
1 parent 537b276 commit f242584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit f242584

Please sign in to comment.