Skip to content

Commit bc812df

Browse files
committed
fix(scp remote_files): do not filter generated paths with "$cur"
This is a regression introduced by commit f2df91d, where `_comp_split` was replaced by `_comp_compgen_split` assuming that the generated words are starting with "$cur". However, we here would like to generate the paths essentially starting with `_path=${cur#*:}` instead of $cur because the caller re-assembles $cur with `-n :`, yet Readline expects the words after `:`. Fixes #1157
1 parent 50865aa commit bc812df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions/ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)