summaryrefslogtreecommitdiff
path: root/completions/function
diff options
context:
space:
mode:
Diffstat (limited to 'completions/function')
-rw-r--r--completions/function6
1 files changed, 3 insertions, 3 deletions
diff --git a/completions/function b/completions/function
index 6156e63d..e8e4d751 100644
--- a/completions/function
+++ b/completions/function
@@ -6,12 +6,12 @@ _function()
_init_completion || return
if [[ $1 == @(declare|typeset) ]]; then
- if [ "$prev" = -f ]; then
+ if [[ $prev == -f ]]; then
COMPREPLY=( $( compgen -A function -- "$cur" ) )
elif [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
- elif [ $cword -eq 1 ]; then
+ elif [[ $cword -eq 1 ]]; then
COMPREPLY=( $( compgen -A function -- "$cur" ) )
else
COMPREPLY=( "() $( type -- ${words[1]} | sed -e 1,2d )" )