zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Stephen Rueger <stephen.rueger@rechnerpost.org>
Cc: zsh-workers@sunsite.dk
Subject: Re: PATCH: _module-assistant
Date: Sun, 17 Apr 2005 14:46:49 -0400	[thread overview]
Message-ID: <20050417184649.GA28637@scowler.net> (raw)
In-Reply-To: <d9haj2-v1s.ln1@rechnerpost.org>

> Please incorporate whatever you want from my version of _module-assistant

Great, thanks for sharing.

This should combine all the features except the completion of "all" or
"alli" if any of the appropriate subcommands are on the line.

Index: Completion/Debian/Command/_module-assistant
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_module-assistant,v
retrieving revision 1.1
diff -u -r1.1 _module-assistant
--- Completion/Debian/Command/_module-assistant	17 Apr 2005 16:17:52 -0000	1.1
+++ Completion/Debian/Command/_module-assistant	17 Apr 2005 18:43:30 -0000
@@ -1,6 +1,26 @@
 #compdef module-assistant m-a
 
-_arguments \
+typeset -a _module_assistant_commands
+
+_module_assistant_commands=(
+    "update[synchronize version index files]"
+    "prepare[install required kernel headers package]"
+    "fakesource[install required kernel source package]"
+    "list[a print a list of details about available packages]"
+    "list-available[b print a list of details about available packages ]"
+    "la[c print a list of details about available packages  ]"
+    "list-installed[ print a list of details about installed packages ]"
+    "li[print a list of details about installed packages  ]"
+    "search[search for packages]"
+    "get[install specified source package]"
+    "build[build specified packages]"
+    "install[install specified packages]"
+    "auto-install[do all necessary steps to install specified packages]"
+    "clean[clear build directories of the kernel packages]"
+    "purge[clear cache and remove all binary packages of source package]"
+)
+
+_arguments -A \
  '(-h --help)'{-h,--help}'[print help screen]' \
  '(-v --verbose)'{-v,--verbose}'[Be verbose, show full paths, etc.]' \
  '(-q --quiet)'{-q,--quiet}'[The opposite of verbose]' \
@@ -12,6 +32,6 @@
  '(-l --kvers-list)'{-l,--kvers-list}'[List of kernel versions to work on (default: current version)]:kernel version list:' \
  '(-k --kernel-dir)'{-k,--kernel-dir}'[List of kernel headers/source directories, comma separated]:list of dirs:_files -/' \
  '(-t --text-mode)'{-t,--text-mode}'[no progress bars]' \
- '1:list of commands:_values -s , subcommands update get build list install auto-install prepare clean purge' \
- '*:packages: compadd ${${${$(ls /usr/src/modass/var_cache_modass/*.avail_version)}:t}%.avail_version}'
+ '1:list of commands:_values -s , subcommands "${_module_assistant_commands[@]}"' \
+ '*:packages: compadd /usr/src/modass/var_cache_modass/*.avail_version(N:t:r) /var/cache/modass/*.avail_version(N:t:r)'
 


      reply	other threads:[~2005-04-17 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 16:15 Clint Adams
2005-04-17 16:59 ` Stephen Rueger
2005-04-17 18:46   ` Clint Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050417184649.GA28637@scowler.net \
    --to=clint@zsh.org \
    --cc=stephen.rueger@rechnerpost.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).