Skip to content

Commit 4babb5a

Browse files
committed
fix(xfunc ssh scp_remote_files): protect against failglob
1 parent f391bbb commit 4babb5a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

completions/ssh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ _comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]'
435435
# shellcheck disable=SC2120
436436
_comp_xfunc_ssh_scp_remote_files()
437437
{
438-
local IFS=$'\n'
439-
440438
# remove backslash escape from the first colon
441439
cur=${cur/\\:/:}
442440

@@ -468,7 +466,7 @@ _comp_xfunc_ssh_scp_remote_files()
468466
command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/[*@|=]$//g' \
469467
-e 's/[^\/]$/& /g')
470468
fi
471-
COMPREPLY+=($files)
469+
_comp_split -la COMPREPLY "$files"
472470
}
473471

474472
_comp_deprecate_func _scp_remote_files _comp_xfunc_ssh_scp_remote_files

0 commit comments

Comments
 (0)