slapt: Use _parse_help.

This commit is contained in:
Igor Murzov 2011-06-12 18:27:22 +04:00
parent 9cb6a1cd70
commit 3d70a32ce4

View File

@ -18,15 +18,9 @@ _slapt_get()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--download-only -d --simulate -s \
--no-prompt -y --prompt -p --reinstall --ignore-excludes \
--no-md5 --ignore-dep --no-dep --print-uris --show-stats -S \
--config -c --remove-obsolete --retry --no-upgrade \
--update -u --upgrade --dist-upgrade --install -i --install-set \
--remove --show --filelist --search --list --available \
--installed --clean --autoclean --add-keys \
--version --help -h' -- "$cur" ) )
return 0
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
[[ $COMPREPLY ]] && return 0
fi
local i t
@ -103,11 +97,9 @@ _slapt_src()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--update -u --list -l --clean -e \
--search -s --show -w --install -i --build -b --fetch -f \
--yes -y --config -c --no-dep -n --postprocess -p \
--version -v --help -h' -- "$cur" ) )
return 0
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
[[ $COMPREPLY ]] && return 0
fi
local i t