zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _growisofs -Z/-M
@ 2007-08-18  4:16 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2007-08-18  4:16 UTC (permalink / raw)
  To: zsh-workers

One regression from my original incomplete version is that -Z and -M
take devicename=filename pairs, which I assumed was covered by the
_mkisofs_pathspec function, even though that is obviously not the case.
I've incorporated the glob from Nikolai's version this time around.

Also, what's going on with the /dev/pts/7 and /dev/pts/8 stuff?

Index: Completion/Unix/Command/_growisofs
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_growisofs,v
retrieving revision 1.2
diff -u -r1.2 _growisofs
--- Completion/Unix/Command/_growisofs	9 Aug 2007 03:03:07 -0000	1.2
+++ Completion/Unix/Command/_growisofs	18 Aug 2007 04:12:10 -0000
@@ -1,5 +1,8 @@
 #compdef mkisofs growisofs
 
+local context state line
+typeset -A opt_args
+
 declare -a find_options
 
 find_options=(
@@ -181,8 +184,8 @@
 
   if [[ $service == growisofs ]]; then
     growisofs_options=(
-      '-Z[burn an initial session to the selected device]:device:_files -g "*(%,@)"'
-      '-M[merge a session with an existing one on the selected device]:device:_files -g "*(%,@)"'
+      '-Z[burn an initial session to the selected device]:device:->devimg'
+      '-M[merge a session with an existing one on the selected device]:device:->devimg'
       '-dvd-compat[provide maximum compatibility with DVD-ROM/Video]'
       '-dry-run[do everything up to the actual burning process]'
       '-overburn[allow overburning of the media]'
@@ -328,5 +331,15 @@
     '(- *)-help[display help message]' \
     '(- *)-version[display version information]' \
     $growisofs_options \
-    '*:pathspec:_mkisofs_pathspec'
+    '*:pathspec:_mkisofs_pathspec' && return 0
+
+    case "$state" in
+      (devimg)
+      if compset -P \*=; then
+        _files
+      else
+        _files -g "*(%,@)"
+      fi
+      ;;
+      esac
 fi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-18  4:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-18  4:16 PATCH: _growisofs -Z/-M Clint Adams

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).