made _ssh_or_mosh_args() consume output of _tty_info() directly
This commit is contained in:
parent
d6ea9ad9c7
commit
cdda729983
1 changed files with 5 additions and 7 deletions
12
.tmux.conf
12
.tmux.conf
|
@ -546,7 +546,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
|||
# }
|
||||
#
|
||||
# _ssh_or_mosh_args() {
|
||||
# args=$(printf '%s' "$1" | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1=""; print $0; exit }')
|
||||
# args=$(printf '%s' "$1" | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1 = $2 = $3 = ""; print $0; exit }')
|
||||
# if [ -z "$args" ]; then
|
||||
# args=$(printf '%s' "$1" | grep 'mosh-client' | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g')
|
||||
# fi
|
||||
|
@ -559,14 +559,13 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
|||
# ssh_only=$2
|
||||
#
|
||||
# tty_info=$(_tty_info "$tty")
|
||||
# command=$(printf '%s' "$tty_info" | cut -d' ' -f3-)
|
||||
#
|
||||
# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command")
|
||||
# ssh_or_mosh_args=$(_ssh_or_mosh_args "$tty_info")
|
||||
# if [ -n "$ssh_or_mosh_args" ]; then
|
||||
# # shellcheck disable=SC2086
|
||||
# username=$(command ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^user / { print $2 }')
|
||||
# username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^user / { print $2 }')
|
||||
# # shellcheck disable=SC2086
|
||||
# [ -z "$username" ] && username=$(command ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%username% / { print $2; exit }')
|
||||
# [ -z "$username" ] && username=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%username% / { print $2; exit }')
|
||||
# else
|
||||
# if ! _is_enabled "$ssh_only"; then
|
||||
# username=$(printf '%s' "$tty_info" | cut -d' ' -f2)
|
||||
|
@ -581,9 +580,8 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
|||
# ssh_only=$2
|
||||
#
|
||||
# tty_info=$(_tty_info "$tty")
|
||||
# command=$(printf '%s' "$tty_info" | cut -d' ' -f3-)
|
||||
#
|
||||
# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command")
|
||||
# ssh_or_mosh_args=$(_ssh_or_mosh_args "$tty_info")
|
||||
# if [ -n "$ssh_or_mosh_args" ]; then
|
||||
# # shellcheck disable=SC2086
|
||||
# hostname=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^hostname / { print $2 }')
|
||||
|
|
Loading…
Reference in a new issue