Skip to content

Commit c343c46

Browse files
committed
fix(function): suppress error messages for non-existent functions
1 parent 541f7b1 commit c343c46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions/function

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _function()
88
if ((cword == 1)); then
99
COMPREPLY=($(compgen -A function -- "$cur"))
1010
else
11-
COMPREPLY=("() $(type -- ${words[1]} | command sed -e 1,2d)")
11+
COMPREPLY=("() $(type -- "${words[1]}" 2>/dev/null | command sed -e 1,2d)")
1212
fi
1313
} &&
1414
complete -F _function function

0 commit comments

Comments
 (0)