From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27704 invoked from network); 18 Aug 2007 04:17:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Aug 2007 04:17:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 30806 invoked from network); 18 Aug 2007 04:17:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Aug 2007 04:17:01 -0000 Received: (qmail 6329 invoked by alias); 18 Aug 2007 04:16:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23775 Received: (qmail 6320 invoked from network); 18 Aug 2007 04:16:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Aug 2007 04:16:57 -0000 Received: (qmail 30493 invoked from network); 18 Aug 2007 04:16:57 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 18 Aug 2007 04:16:54 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 52AC85CE9C; Sat, 18 Aug 2007 00:16:52 -0400 (EDT) Date: Sat, 18 Aug 2007 00:16:53 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _growisofs -Z/-M Message-ID: <20070818041653.GA32193@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-11) 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