about summary refs log tree commit diff
path: root/Completion/Debian/Command/_debfoster
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/Command/_debfoster')
-rw-r--r--Completion/Debian/Command/_debfoster149
1 files changed, 62 insertions, 87 deletions
diff --git a/Completion/Debian/Command/_debfoster b/Completion/Debian/Command/_debfoster
index 8f7f1b082..154d0e913 100644
--- a/Completion/Debian/Command/_debfoster
+++ b/Completion/Debian/Command/_debfoster
@@ -1,93 +1,68 @@
 #compdef debfoster
 
-_arguments \
-'(--verbose)-v[be a loudmouth]' \
-'(-v)--verbose[be a loudmouth]' \
-'(--version)-V[show version and copyright information]' \
-'(-V)--version[show version and copyright information]' \
-'(--help)-h[show this message]' \
-'(-h)--help[show this message]' \
-'(--quiet)-q[silently build keeper file]' \
-'(-q)--quiet[silently build keeper file]' \
-'(--force)-f[force system to conform to keeper file]' \
-'(-f)--force[force system to conform to keeper file]' \
-'(--mark-only)-m[do not install or delete packages]' \
-'(-m)--mark-only[do not install or delete packages]' \
-'(--upgrade)-u[try to upgrade dependencies]' \
-'(-u)--upgrade[try to upgrade dependencies]' \
-'(--config FILE)-c[specify configuration file]' \
-'(-c)--config FILE[specify configuration file]' \
-'(--keeperfile FILE)-k[specify keeper file]' \
-'(-k)--keeperfile FILE[specify keeper file]' \
-'(--no-keeperfile)-n[do not read keeper file]' \
-'(-n)--no-keeperfile[do not read keeper file]' \
-'(--ignore-default-rules)-i[ignore default rules]' \
-'(-i)--ignore-default-rules[ignore default rules]' \
-'(--show-keepers)-a[show packages on keeper list]' \
-'(-a)--show-keepers[show packages on keeper list]' \
-'(--show-orphans)-s[show orphaned packages]' \
-'(-s)--show-orphans[show orphaned packages]' \
-'(--show-depends)-d[show all depends of PACKAGE]:package:_deb_packages avail'   \
-'(-d)--show-depends[show all depends of PACKAGE]:package:_deb_packages avail'   \
-'(--show-dependents)-e[show dependents of PACKAGE]:package:_deb_packages avail' \
-'(-e)--show-dependents[show dependents of PACKAGE]:package:_deb_packages avail' \
-'(--show-providers)-p[show packages providing PACKAGE]:package:_deb_packages avail' \
-'(-p)--show-providers[show packages providing PACKAGE]:package:_deb_packages avail' \
-'(--show-related)-r[show packages brought in by PACKAGE]:package:_deb_packages avail' \
-'(-r)--show-related[show packages brought in by PACKAGE]:package:_deb_packages avail' \
-'(--use-tasks)-t[make tasks visible as packages]' \
-'(-t)--use-tasks[make tasks visible as packages]' \
-'*-'{-option,o}'[override any configuration option]:option string:->option' \
-'*:package markings: _alternative "installed:installed packages:_deb_packages -S- installed" "uninstalled:uninstalled packages:_deb_packages uninstalled"' \
-&& return 0
+local curcontext="$curcontext" state line expl ret=1
 
-ret=1
+_arguments -C \
+  '(-v --verbose)'{-v,--verbose}'[be a loudmouth]' \
+  '(-V --version)'{-V,--versuib}'[show version and copyright information]' \
+  '(-h --help)'{-h,--help}'[show help information]' \
+  '(-q --quiet)'{-q,--quiet}'[silently build keeper file]' \
+  '(-f --force)'{-f,--force}'[force system to conform to keeper file]' \
+  '(-m --mark-only)'{-m,--mark-only}'[do not install or delete packages]' \
+  '(-u --upgrade)'{-u,--upgrade}'[try to upgrade dependencies]' \
+  '(-c --config)'{-c,--config}'[specify configuration file]:file:_files' \
+  '(-k --keeperfile)'{-k,--keeperfile}'[specify keeper file]:file:_files' \
+  '(-n --no-keeperfile)'{-n,--no-keeperfile}'[do not read keeper file]' \
+  '(-i --ignore-default-rules)'{-i,--ignore-default-rules}'[ignore default rules]' \
+  '(-a --show-keepers)'{-a,--show-keepers}'[show packages on keeper list]' \
+  '(-s --show-orphans)'{-s,--show-orphans}'[show orphaned packages]' \
+  '(-d --show-depends)'{-d,--show-depends}'[show all depends of specified package]:package:_deb_packages avail'   \
+  '(-e --show-dependents)'{-e,--show-dependents}'[show dependents of specified package]:package:_deb_packages avail' \
+  '(-p --show-providers)'{-p,--show-providers}'[show packages providing specified package]:package:_deb_packages avail' \
+  '(-r --show-related)'{-r,--show-related}'[show packages brought in by specified package]:package:_deb_packages avail' \
+  '(-t --use-tasks)'{-t,--use-tasks}'[make tasks visible as packages]' \
+  '*-'{-option,o}'[override any configuration option]:option string:->option' \
+  '*:package markings: _alternative "installed:installed packages:_deb_packages -S- installed" "uninstalled:uninstalled packages:_deb_packages uninstalled"' \
+  && ret=0
 
-while [[ -n "$state" ]]; do
-      lstate="$state"
-      state=''
-
-      case "$lstate" in
-      option)
-        if compset -P '*='; then
-          case "$IPREFIX" in
-          *(#i)(install|remove|info)cmd*)
-            _wanted values expl 'command string' _command && ret=0
-            ;;
-	  *(#i)(keeperfile|dpkg(status|available))*)
-	    _wanted values expl 'metadata file' _files && ret=0
-	    ;;
-	  *(#i)maxpriority*)
-	    _wanted values expl 'package priority' \
-	      compadd required important standard optional extra ANY && ret=0
-	    ;;
-          *(#i)(use(hold|essential|predepends|recommends|suggests|tasks)|negativekeepers|verbose|force|quiet)*)
-            _wanted values expl 'truth value' \
-              compadd yes no && ret=0
-            ;;
-	  *(#i)(no|)keepsections*)
-            _wanted values expl 'section' \
-	      compadd x11 web utils text tex sound shells science \
-	       otherosfs oldlibs news net misc math mail libs \
-	       interpreters hamradio graphics games electronics \
-	       editors doc devel comm base admin && ret=0
-	    ;;
-	  *(#i)guessdepends*)
-            _wanted values expl 'name extension' \
-	      compadd doc dev && ret=0
-	    ;;
-	  esac
-	else
-          _wanted values expl 'configure file option' \
-              compadd -M 'm:{a-z}={A-Z}' -S '=' - \
-                  InstallCmd RemoveCmd InfoCmd KeeperFile DpkgStatus \
-                  DpkgAvailable MaxPriority UseHold UseEssential \
-                  UsePreDepends UseRecommends UseSuggests UseTasks \
-                  KeepSections NokeepSections GuessDepends NegativeKeepers \
-		  Verbose Force Quiet && ret=0
-        fi
-        ;;
-      esac
-done
+if [[ -n "$state" ]]; then
+  if compset -P '*='; then
+    case "$IPREFIX" in
+    *(#i)(install|remove|info)cmd*)
+      _wanted values expl 'command string' _command && ret=0
+      ;;
+    *(#i)(keeperfile|dpkg(status|available))*)
+      _wanted values expl 'metadata file' _files && ret=0
+      ;;
+    *(#i)maxpriority*)
+      _wanted values expl 'package priority' \
+	compadd required important standard optional extra ANY && ret=0
+      ;;
+    *(#i)(use(hold|essential|predepends|recommends|suggests|tasks)|negativekeepers|verbose|force|quiet)*)
+      _wanted values expl 'truth value' \
+	compadd yes no && ret=0
+      ;;
+    *(#i)(no|)keepsections*)
+      _wanted values expl 'section' compadd \
+	  x11 web utils text tex sound shells science \
+	  otherosfs oldlibs news net misc math mail libs \
+	  interpreters hamradio graphics games electronics \
+	  editors doc devel comm base admin && ret=0
+      ;;
+    *(#i)guessdepends*)
+      _wanted values expl 'name extension' \
+	  compadd doc dev && ret=0
+      ;;
+    esac
+  else
+    _wanted values expl 'configure file option' \
+	compadd -M 'm:{a-z}={A-Z}' -S '=' - \
+	    InstallCmd RemoveCmd InfoCmd KeeperFile DpkgStatus \
+	    DpkgAvailable MaxPriority UseHold UseEssential \
+	    UsePreDepends UseRecommends UseSuggests UseTasks \
+	    KeepSections NokeepSections GuessDepends NegativeKeepers \
+	    Verbose Force Quiet && ret=0
+  fi
+fi
 
 return ret