diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-18 19:11:28 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-18 19:11:28 +0200 |
commit | 825f3cce05c27a361d060140232d1e72ef26c351 (patch) | |
tree | e84eec8342891f7be4a5256616312979d79eb8f0 | |
parent | 43681ffac6c73d043a2fa981f9c255040e801775 (diff) | |
download | bash-completion-825f3cce05c27a361d060140232d1e72ef26c351.tar.gz |
Use _parse_help in _bzip2().
-rw-r--r-- | contrib/bzip2 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/bzip2 b/contrib/bzip2 index 5a164556..68fb7c5a 100644 --- a/contrib/bzip2 +++ b/contrib/bzip2 @@ -3,17 +3,16 @@ have bzip2 && _bzip2() { - local cur prev xspec + local cur prev xspec helpopts COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} + helpopts=`_parse_help bzip2` if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-1 -2 -3 -4 -5 -6 -7 -8 -9 \ - --help --decompress --compress --keep --force \ - --test --stdout --quiet --verbose --license \ - --version --small --fast --best' -- "$cur" ) ) + COMPREPLY=( $( compgen -W "$helpopts -2 -3 -4 -5 -6 -7 -8 -9" \ + -- "$cur" ) ) return 0 fi |