We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c343c46 commit f45fc77Copy full SHA for f45fc77
completions/function
@@ -8,7 +8,8 @@ _function()
8
if ((cword == 1)); then
9
COMPREPLY=($(compgen -A function -- "$cur"))
10
else
11
- COMPREPLY=("() $(type -- "${words[1]}" 2>/dev/null | command sed -e 1,2d)")
+ local funcdef=$(type -- "${words[1]}" 2>/dev/null | command sed -e 1,2d)
12
+ COMPREPLY=("()${funcdef:+ $funcdef}")
13
fi
14
} &&
15
complete -F _function function
0 commit comments