declare, typeset: Use _parse_usage.

This commit is contained in:
Ville Skyttä 2011-11-25 19:59:35 +02:00
parent 03463a157f
commit bcf41c74c2

View File

@ -9,7 +9,7 @@ _function()
if [[ $prev == -f ]]; then if [[ $prev == -f ]]; then
COMPREPLY=( $( compgen -A function -- "$cur" ) ) COMPREPLY=( $( compgen -A function -- "$cur" ) )
elif [[ "$cur" == -* ]]; then elif [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- "$cur" ) ) COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi fi
elif [[ $cword -eq 1 ]]; then elif [[ $cword -eq 1 ]]; then
COMPREPLY=( $( compgen -A function -- "$cur" ) ) COMPREPLY=( $( compgen -A function -- "$cur" ) )