We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_comp_compgen
_comp_xfunc_ssh_identityfile
1 parent 83f033f commit 05e70edCopy full SHA for 05e70ed
completions/ssh
@@ -273,13 +273,10 @@ _comp_cmd_ssh__configfile()
273
# shellcheck disable=SC2120
274
_comp_xfunc_ssh_identityfile()
275
{
276
- local cur=$cur
+ local cur=$cur tmp
277
[[ ! $cur && -d ~/.ssh ]] && cur=~/.ssh/id
278
- _comp_compgen -a filedir
279
- if ((${#COMPREPLY[@]} > 0)); then
280
- COMPREPLY=($(compgen -W '"${COMPREPLY[@]}"' \
281
- -X "${1:+!}*.pub" -- "$cur"))
282
- fi
+ _comp_compgen -v tmp -c "$cur" filedir &&
+ _comp_compgen -- -W '"${tmp[@]}"' -X "${1:+!}*.pub"
283
}
284
285
_comp_deprecate_func 2.12 _ssh_identityfile _comp_xfunc_ssh_identityfile
0 commit comments