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()
543543 local files
544544 _comp_expand_glob files ' "$cur"*' || return 0
545545 if [[ $_dirsonly ]]; then
546- _comp_compgen -RU files split -l -- " $(
546+ _comp_compgen -RU files split -l ${1 : +-P " $1 " } -- " $(
547547 command ls -aF1dL " ${files[@]} " 2> /dev/null |
548548 command sed -e " s/$_comp_cmd_scp__path_esc /\\\\ &/g" \
549- -e ' /[^/]$/d' -e " s/^/ ${1-} / "
549+ -e ' /[^/]$/d'
550550 ) "
551551 else
552- _comp_compgen -RU files split -l -- " $(
552+ _comp_compgen -RU files split -l ${1 : +-P " $1 " } -- " $(
553553 command ls -aF1dL " ${files[@]} " 2> /dev/null |
554554 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'
557556 ) "
558557 fi
559558}
You can’t perform that action at this time.
0 commit comments