From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1472 invoked from network); 25 Sep 2007 14:30:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) 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.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Sep 2007 14:30:22 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 37610 invoked from network); 25 Sep 2007 14:30:15 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Sep 2007 14:30:15 -0000 Received: (qmail 11144 invoked by alias); 25 Sep 2007 14:30:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23827 Received: (qmail 11128 invoked from network); 25 Sep 2007 14:30:12 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Sep 2007 14:30:12 -0000 Received: (qmail 37376 invoked from network); 25 Sep 2007 14:30:12 -0000 Received: from wr-out-0506.google.com (64.233.184.239) by a.mx.sunsite.dk with SMTP; 25 Sep 2007 14:30:06 -0000 Received: by wr-out-0506.google.com with SMTP id c48so649419wra for ; Tue, 25 Sep 2007 07:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=HPze+SG6Y3NWISEx6UFqQiCBFDvZ9c3B9qjoT2NqNkQ=; b=UKryPTm54Zbe1o0M72N8yoCjaHTTXgzlcmRwCxC2XoqmXo+8DCDkOkAeG9KmguUeDSitluHKhdDUoWLZL75AagQyk3zSVco8zAwARFQSWopXE6Dwk/7MWat4Np0UPUt45M5opRWHiVmSXUn95aYQdK2uj+ZIfs77q8WtP89NEx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rFvnMI//EqYLiKqxeNvb/xf612Taqb96xi9In8Iu5lnonHD05mmlo0qSd6frU78O9yqZluOPDhgBa4MxvI7hJQ7FVCB6hw86LVX31qpe5i3B1g1kF4ETBa5rD9MNbo/D1iszpbHwR+pK2IvDCaa004ajQcrAmmd4wcvz6EiD7R8= Received: by 10.143.33.19 with SMTP id l19mr990766wfj.1190730603522; Tue, 25 Sep 2007 07:30:03 -0700 (PDT) Received: by 10.142.86.21 with HTTP; Tue, 25 Sep 2007 07:30:03 -0700 (PDT) Message-ID: <237967ef0709250730t145d2521jc7f1bab00423fb6@mail.gmail.com> Date: Tue, 25 Sep 2007 16:30:03 +0200 From: "Mikael Magnusson" To: "Oliver Kiddle" Subject: [patch] Re: oggenc tabcompletion itch Cc: zsh-workers In-Reply-To: <4893.1190727868@thecus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0709241327u1d6fc7ffm2400e05e1478dc16@mail.gmail.com> <4893.1190727868@thecus> On 25/09/2007, Oliver Kiddle wrote: > "Mikael Magnusson" wrote: > > The options completion for oggenc wants options like -q 3 with a > > space, but oggenc accepts -q3 without a space happily too. Being lazy > > > the line for -q in _vorbis looks like > > '(-q --quality)'{-q,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \ > > By putting a + after the -q, you can indicate that the argument can > optionally be in the same word. Similarly, a - would mean that the > argument must be in the same word. So the line needs to be changed to: > '(-q --quality)'{-q+,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \ Ah, thanks Here's a patch (probably garbled by gmail, find also at http://git.mikachu.ath.cx/?p=zsh-cvs.git;a=commitdiff_plain;h=vorbisplus) that adds + to places where the ogg tools accept arguments. Also spotted one or two double spaces in descriptions that I fixed. diff --git a/Completion/Unix/Command/_vorbis b/Completion/Unix/Command/_vorbis index 6bb201c..b91f35c 100644 --- a/Completion/Unix/Command/_vorbis +++ b/Completion/Unix/Command/_vorbis @@ -8,59 +8,59 @@ case $service in '(- *)'{-h,--help}'[show help]' \ '(- *)'{-v,--version}'[display version information]' \ '(-r --raw)'{-r,--raw}'[assume input data is raw, little-endian with no header information]' \ - '(-B --raw-bits)'{-B,--raw-bits=}'[set raw mode input sample size in bits]:sample size:(8 16)' \ - '(-C --raw-chan)'{-C,--raw-chan=}'[set raw mode input number of channels]:number of channels' \ - '(-R --raw-rate)'{-R,--raw-rate=}'[set raw mode input sample rate]:sample rate:(44100 48000)' \ + '(-B --raw-bits)'{-B+,--raw-bits=}'[set raw mode input sample size in bits]:sample size:(8 16)' \ + '(-C --raw-chan)'{-C+,--raw-chan=}'[set raw mode input number of channels]:number of channels' \ + '(-R --raw-rate)'{-R+,--raw-rate=}'[set raw mode input sample rate]:sample rate:(44100 48000)' \ '--raw-endianness[set raw mode endianness]:endianness:((0\:big\ endian 1\:little\ endian))' \ '(-Q --quiet)'{-Q,--quiet}'[quiet mode]' \ - '(-b --bitrate)'{-b,--bitrate=}'[set encoding to the bitrate closest to that specified]:bitrate (kb/s)' \ - '(-m --min-bitrate)'{-m,--min-bitrate=}'[set minimum bitrate]:bitrate (kb/s)' \ - '(-M --max-bitrate)'{-M,--max-bitrate=}'[set maximum bitrate]:bitrate (kb/s)' \ + '(-b --bitrate)'{-b+,--bitrate=}'[set encoding to the bitrate closest to that specified]:bitrate (kb/s)' \ + '(-m --min-bitrate)'{-m+,--min-bitrate=}'[set minimum bitrate]:bitrate (kb/s)' \ + '(-M --max-bitrate)'{-M+,--max-bitrate=}'[set maximum bitrate]:bitrate (kb/s)' \ '--managed[turn off the normal VBR encoding]' \ - '(-q --quality)'{-q,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \ + '(-q --quality)'{-q+,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \ '--resample[resample input to the given sample rate before encoding]:sample rate (Hz)' \ '--downmix[down mix input from stereo to mono]' \ '--advanced-encode-option:option name:_values option "bitrate_average_window[set the managed bitrate window]\:number (seconds)" "lowpass_frequency[set the lowpass frequency]\:frequency (kHz)"' \ - '(-s --serial)'{-s,--serial}'[force a specific serial number in the output stream]' \ + '(-s --serial)'{-s+,--serial=}'[force a specific serial number in the output stream]' \ "--discard-comments[don't copy comments from FLAC file to output Ogg Vorbis file]" \ - '(-o --output)'{-o,--output=}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles' \ - '(-n --names)'{-n,--names=}'[specify pattern for producing filenames]:string' \ - '(-X --name-remove)'{-X,--name-remove=}'[remove specified characters from output filenames]:characters' \ - '(-P --name-replace)'{-P,--name-replace=}'[specify replacement characters for those removed]:characters' \ - '(-c --comment)'{-c,--comment}'[add the string comment as an extra comment]:comment' \ - '(-a --artist)'{-a,--artist}'[set the artist comment field in the comments to artist]:artist' \ - '(-G --genre)'{-G,--genre}'[set the genre comment field in the comments to genre]:genre' \ - '(-d --date)'{-d,--date}'[set the date comment field to the given value]:date' \ - '(-N --tracknum)'{-N,--tracknum}'[set the track number comment field to the given value]:track number' \ - '(-t --title)'{-t,--title}'[set the track title comment field to title]:title' \ - '(-l --album)'{-l,--album}'[set the album comment field to album]' \ + '(-o --output)'{-o+,--output=}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles' \ + '(-n --names)'{-n+,--names=}'[specify pattern for producing filenames]:string' \ + '(-X --name-remove)'{-X+,--name-remove=}'[remove specified characters from output filenames]:characters' \ + '(-P --name-replace)'{-P+,--name-replace=}'[specify replacement characters for those removed]:characters' \ + '(-c --comment)'{-c+,--comment}'[add the string comment as an extra comment]:comment' \ + '(-a --artist)'{-a+,--artist}'[set the artist comment field in the comments to artist]:artist' \ + '(-G --genre)'{-G+,--genre}'[set the genre comment field in the comments to genre]:genre' \ + '(-d --date)'{-d+,--date}'[set the date comment field to the given value]:date' \ + '(-N --tracknum)'{-N+,--tracknum}'[set the track number comment field to the given value]:track number' \ + '(-t --title)'{-t+,--title}'[set the track title comment field to title]:title' \ + '(-l --album)'{-l+,--album}'[set the album comment field to album]' \ '*:input file:_files -g "(#i)*.(flac|wav|aiff)(-.)"' && ret=0 ;; ogg123) _arguments -C -s \ '(- *)'{-h,--help}'[show help]' \ '(- *)'{-V,--version}'[display version information]' \ - \*{-d,--device}'[output device]:device:((null\:discard\ all\ data oss\:open\ sound\ system sun\:sun\ audio alsa\:advanced\ linux\ sound\ architecture irix\:IRIX\ audio arts\:aRts\ sound\ daemon esd\:enlightened\ sound\ daemon au\:sun\ audio\ file raw\:raw\ sample wav\:wav\ file))' \ - \*{-f,--files=}'[output filename for a previously specified file device]:output filename:_files -g "(#i)*.(wav|au|raw)(-.)"' \ - '(-k --skip)'{-k,--skip}"[skip the first 'n' seconds (or to hh:mm:ss)]:seconds" \ - '(-K --end)'{-K,--end}"[end at 'n' seconds (or hh:mm:ss)]:seconds" \ - '(-b --buffer)'{-b,--buffer}'[size of input buffer]:kilobytes' \ - '(-p --prebuffer)'{-p,--prebuffer}'[prebuffer percentage]:percent' \ + \*{-d+,--device}'[output device]:device:((null\:discard\ all\ data oss\:open\ sound\ system sun\:sun\ audio alsa\:advanced\ linux\ sound\ architecture irix\:IRIX\ audio arts\:aRts\ sound\ daemon esd\:enlightened\ sound\ daemon au\:sun\ audio\ file raw\:raw\ sample wav\:wav\ file))' \ + \*{-f+,--files=}'[output filename for a previously specified file device]:output filename:_files -g "(#i)*.(wav|au|raw)(-.)"' \ + '(-k --skip)'{-k+,--skip}"[skip the first 'n' seconds (or to hh:mm:ss)]:seconds" \ + '(-K --end)'{-K+,--end}"[end at 'n' seconds (or hh:mm:ss)]:seconds" \ + '(-b --buffer)'{-b+,--buffer}'[size of input buffer]:kilobytes' \ + '(-p --prebuffer)'{-p+,--prebuffer}'[prebuffer percentage]:percent' \ '(-q --quiet)*'{-v,--verbose}'[increase verbosity]' \ '(-q --quiet -v --verbose)'{--quiet,-q}'[quiet mode]' \ - '(-x --nth)'{-x,--nth}'[block decode intervall]:number' \ - '(-y --ntimes)'{-y,--ntimes}'[block repeat count]:number' \ + '(-x --nth)'{-x+,--nth}'[block decode intervall]:number' \ + '(-y --ntimes)'{-y+,--ntimes}'[block repeat count]:number' \ '(-z --shuffle)'{-z,--shuffle}'[shuffle play]' \ - '(-l --delay)'{-l,--delay=}'[set delay between two SIGINTs to quit]:delay (ms)' \ - '(-@ --list)'{-@,--list}'[play all of the files from a playlist]:playlist:_files' \ - '--audio-buffer[size of output audio buffer]:kilobytes' \ + '(-l --delay)'{-l+,--delay=}'[set delay between two SIGINTs to quit]:delay (ms)' \ + '(-@ --list)'{-@+,--list}'[play all of the files from a playlist]:playlist:_files' \ + '--audio-buffer=[size of output audio buffer]:kilobytes' \ \*{-o,--device-option=}'[assign device option values]:device option:->devopts' \ '*:sound file or directory:_files -g "(#i)*.(ogg|flac)"' && ret=0 ;; ogginfo) _arguments \ '(- *)-h[show a help and usage message]' \ - '(-)*-q[quiet mode]' \ + '(-)*-q[quiet mode]' \ '(-)-v[verbose mode]' \ '*:ogg vorbis file:_files -g "(#i)*.ogg(-.)"' && ret=0 ;; @@ -69,11 +69,11 @@ case $service in '(-Q --quiet)'{-Q,--quiet}'[quiet mode]' \ '(- *)'{-h,--help}'[print help information]' \ '(- *)'{-v,--version}'[display version information]' \ - '(-b --bits)'{-b,--bits=}'[bits per sample]:bits per sample:(8 16)' \ - '(-e --endian)'{-e,--endian=}'[set endianness for 16-bit output]:endianness:((0\:\(default\)\ little-endian\ \(Intel\ byte\ order\) 1\:big-endian\ \(sane\ byte\ order\)))' \ - '(-R --raw)'{-R,--raw=}'[output in raw format]' \ - '(-o --output)'{-o,--output=}'[write output to specified filename]:output filename:_files' \ - '(-s --sign)'{-s,--sign=}'[set signedness for output]:signedness:((0\:unsigned 1\:signed\ \(default\)))' \ + '(-b --bits)'{-b+,--bits=}'[bits per sample]:bits per sample:(8 16)' \ + '(-e --endian)'{-e+,--endian=}'[set endianness for 16-bit output]:endianness:((0\:\(default\)\ little-endian\ \(Intel\ byte\ order\) 1\:big-endian\ \(sane\ byte\ order\)))' \ + '(-R --raw)'{-R+,--raw=}'[output in raw format]' \ + '(-o --output)'{-o+,--output=}'[write output to specified filename]:output filename:_files' \ + '(-s --sign)'{-s+,--sign=}'[set signedness for output]:signedness:((0\:unsigned 1\:signed\ \(default\)))' \ '*:ogg vorbis file:_files -g "(#i)*.ogg(-.)"' && ret=0 ;; esac -- Mikael Magnusson