File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -543,17 +543,16 @@ _comp_xfunc_scp_compgen_local_files()
543
543
local files
544
544
_comp_expand_glob files ' "$cur"*' || return 0
545
545
if [[ $_dirsonly ]]; then
546
- _comp_compgen -RU files split -l -- " $(
546
+ _comp_compgen -RU files split -l ${1 : +-P " $1 " } -- " $(
547
547
command ls -aF1dL " ${files[@]} " 2> /dev/null |
548
548
command sed -e " s/$_comp_cmd_scp__path_esc /\\\\ &/g" \
549
- -e ' /[^/]$/d' -e " s/^/ ${1-} / "
549
+ -e ' /[^/]$/d'
550
550
) "
551
551
else
552
- _comp_compgen -RU files split -l -- " $(
552
+ _comp_compgen -RU files split -l ${1 : +-P " $1 " } -- " $(
553
553
command ls -aF1dL " ${files[@]} " 2> /dev/null |
554
554
command sed -e " s/$_comp_cmd_scp__path_esc /\\\\ &/g" \
555
- -e ' s/[*@]$//g' -e ' s/\\[|=]$//g' \
556
- -e ' s/[^/]$/& /g' -e " s/^/${1-} /"
555
+ -e ' s/[*@]$//g' -e ' s/\\[|=]$//g' -e ' s/[^/]$/& /g'
557
556
) "
558
557
fi
559
558
}
You can’t perform that action at this time.
0 commit comments