1
0
Fork 0
mirror of synced 2024-11-17 23:15:35 -05:00

updated _username() in when the ssh client doesn't support %r in ProxyCommand (2)

disabled SC2086 violation

SC2086 (info): Double quote to prevent globbing and word splitting
This commit is contained in:
Gregory Pakosz 2023-03-05 17:26:21 +01:00
parent 3994ce38d8
commit 1f5a064820

View file

@ -593,6 +593,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk '/^user / { print $2; exit }')
# # shellcheck disable=SC2086
# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" 2>&1 | awk '/^%username% / { print $2; exit }')
# # shellcheck disable=SC2086
# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -v -T -o ControlPath=none -o ProxyCommand=false -o IdentityFile='%%username%%/%r' 2>&1 | awk '/%username%/ { print substr($4,12); exit }')
# else
# if ! _is_true "$ssh_only"; then