[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-364-gd44aaed
Igor Murzov
e-mail at date.by
Sun Jun 12 14:52:20 UTC 2011
The following commit has been merged in the master branch:
commit 3d70a32ce42850d42bd5dcadc2864b05d7e019a7
Author: Igor Murzov <e-mail at date.by>
Date: Sun Jun 12 18:27:22 2011 +0400
slapt: Use _parse_help.
diff --git a/completions/slapt b/completions/slapt
index 28faf4c..d493342 100644
--- a/completions/slapt
+++ b/completions/slapt
@@ -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
--
bash-completion
More information about the Bash-completion-commits
mailing list