diff options
author | Oliver Kiddle <opk@zsh.org> | 2014-10-21 16:11:09 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2014-10-21 16:11:09 +0200 |
commit | af9f623273eb994d36d3f02ed37bac6edb10c7cb (patch) | |
tree | ce9fb447962017a39bd067e3bb79921de15e0764 /Completion/openSUSE/Command/_SUSEconfig | |
parent | e02ff159b3e0254b783e67a9f8225893284aa213 (diff) | |
download | zsh-af9f623273eb994d36d3f02ed37bac6edb10c7cb.tar.gz zsh-af9f623273eb994d36d3f02ed37bac6edb10c7cb.tar.xz zsh-af9f623273eb994d36d3f02ed37bac6edb10c7cb.zip |
33481: resolve completion clashes and tidy-up SUSE/Mandriva related functions
Diffstat (limited to 'Completion/openSUSE/Command/_SUSEconfig')
-rw-r--r-- | Completion/openSUSE/Command/_SUSEconfig | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/Completion/openSUSE/Command/_SUSEconfig b/Completion/openSUSE/Command/_SUSEconfig index d50828529..737a80b17 100644 --- a/Completion/openSUSE/Command/_SUSEconfig +++ b/Completion/openSUSE/Command/_SUSEconfig @@ -1,15 +1,7 @@ #compdef SuSEconfig -local curcontext="$curcontext" state line -typeset -A opt_args - -if [[ -z "$_SuSEconfig_modules" ]]; then - for i in /sbin/conf.d/SuSEconfig.*; do - case $i in *.rpm*|*.swap|*.bak|*.orig|*~|\#*) continue;; esac - _SuSEconfig_modules=($_SuSEconfig_modules ${i##*/SuSEconfig.}) - done -fi - +local modules +modules=( /sbin/conf.d/SuSEconfig.*~(*.rpm*|*.swap|*.bak|*.orig|*~|\#*)(N:e) ) _arguments \ '--help' \ @@ -17,12 +9,6 @@ _arguments \ '--force' \ '--verbose' \ '--nonewpackage' \ - '--module:module:->module' && return 0 - -case $state in - module) compadd $_SuSEconfig_modules ;; -esac - -# Usage: SuSEconfig [--quick|--nonewpackage|--force|--verbose] [--module name] - - + '-norestarts' \ + '-nomodule' \ + '--module:module:compadd -a modules' |