Skip to content

Commit 9b8b309

Browse files
authored
Merge pull request #1158 from akinomyoga/fix1157
fix(scp remote_files): do not filter generated paths with "$cur"
2 parents d2f59bb + 34f7d0c commit 9b8b309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

completions/ssh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ _comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]'
469469
_comp_xfunc_scp_compgen_remote_files()
470470
{
471471
# remove backslash escape from the first colon
472-
cur=${cur/\\:/:}
472+
local cur=${cur/\\:/:}
473473

474474
local _userhost=${cur%%?(\\):*}
475475
local _path=${cur#*:}
@@ -499,7 +499,7 @@ _comp_xfunc_scp_compgen_remote_files()
499499
command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/[*@|=]$//g' \
500500
-e 's/[^\/]$/& /g')
501501
fi
502-
_comp_compgen_split -l -- "$_files"
502+
_comp_compgen -R split -l -- "$_files"
503503
}
504504

505505
# @deprecated 2.12 use `_comp_compgen -ax ssh remote_files` instead

0 commit comments

Comments
 (0)