From 8c80e4dce14eed4e3c06b16fc307c6c7d20b9af8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 17 May 2024 16:57:17 +0200 Subject: Merging upstream version 1:2.14.0. Signed-off-by: Daniel Baumann --- completions/ssh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'completions/ssh') diff --git a/completions/ssh b/completions/ssh index 386fd25..561dd07 100644 --- a/completions/ssh +++ b/completions/ssh @@ -404,7 +404,7 @@ _comp_cmd_sftp() # Prefer `ssh` from same dir for resolving options, etc local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc_ssh_compgen_suboption_check && return @@ -469,7 +469,7 @@ _comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]' _comp_xfunc_scp_compgen_remote_files() { # remove backslash escape from the first colon - cur=${cur/\\:/:} + local cur=${cur/\\:/:} local _userhost=${cur%%?(\\):*} local _path=${cur#*:} @@ -499,7 +499,7 @@ _comp_xfunc_scp_compgen_remote_files() command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/[*@|=]$//g' \ -e 's/[^\/]$/& /g') fi - _comp_compgen_split -l -- "$_files" + _comp_compgen -R split -l -- "$_files" } # @deprecated 2.12 use `_comp_compgen -ax ssh remote_files` instead @@ -556,7 +556,7 @@ _comp_cmd_scp() # Prefer `ssh` from same dir for resolving options, remote files, etc local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc_ssh_compgen_suboption_check && { ((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]/%/ }") -- cgit v1.2.3