From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6758 invoked from network); 23 Jul 2003 20:14:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Jul 2003 20:14:17 -0000 Received: (qmail 4386 invoked by alias); 23 Jul 2003 20:14:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18894 Received: (qmail 4315 invoked from network); 23 Jul 2003 20:14:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Jul 2003 20:14:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [213.113.203.243] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Jul 2003 20:14:1 -0000 Received: by puritan.pcp.ath.cx (Postfix, from userid 1000) id DE695513C269; Wed, 23 Jul 2003 22:13:47 +0200 (CEST) Date: Wed, 23 Jul 2003 22:13:47 +0200 From: Nikolai Weibull To: zsh-workers@sunsite.dk Subject: Re: some completion functions :) Message-ID: <20030723201347.GA25888@puritan.pcp.ath.cx> References: <1058990237.12981.5.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <1058990237.12981.5.camel@localhost> User-Agent: Mutt/1.5.4i --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 23 2003, baptiste daroussin wrote something resembling: > Hi, > I've written some completion function for : > rar, unrar (_rar) > oggenc, ogginfo, oggdec, ogg123 (_vorbis) > I've updated _links to work with links >= 2.X > I've improved _pkgtool > Sory, no path because I've overwritten the different scripts :( > > I've tested it under gentoo 1.4 with zsh 4.0.6 and slackware 9.1 with > zsh 4.0.7 and zsh 4.1.1 > > Normaly all works :) > nice...here's my ogg123 completion function. i think it is a bit more complete than yours. you may want to include some of them perhaps? enjoy, nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,php,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_ogg123 #compdef ogg123 # this still needs fixing with the --device-option code local expl _arguments \ '--audio-buffer[size of output buffer]:kilobytes:' \ {'(-@)--list','(--list)-@'}'[playlist to play from]:playlist:_files' \ {'(-b)--buffer','(--buffer)-b'}'[size of input buffer]:kilobytes:' \ {'(-p)--prebuffer','(--prebuffer)-p'}'[prebuffer percentage]:percent:' \ {'(-d)--device','(--device)-d'}'[output device]:device:((null\:"discards 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)--file','(--file)-f'}'[output file for file devices]:file:_files' \ {'(-h)--help','(--help)-h'}'[show help]' \ {'(-k)--skip','(--skip)-k'}'[skip into file]:seconds:' \ {'*--device-option','*-o'}'[assign device option values]:devopts:->devopts' \ {'(--verbose -v -q)--quiet','(--verbose -v --quiet)-q'}'[quiet mode]' \ {'(-V)--version','(--version)-V'}'[display version information]' \ {'(--quiet -q)*--verbose','(--quiet -q)*-v'}'[increase verbosity]' \ {'(-x)--nth','(--nth)-x'}'[block decode interval]:number:' \ {'(-y)--ntimes','(--ntimes)-y'}'[block repeat count]:number:' \ {'(-z)--shuffle','(--shuffle)-z'}'[play input audio in random order]' \ '*:files:->files' && return 0 case "$state" in files) _description files expl 'ogg vorbis file' _files "$expl[@]" -g '*.ogg' ;; devopts) _setup devopts _tags devopts _description devopts expl 'device options' compadd "$expl[@]" -S : - dsp dev card buf_size host byteorder ;; esac --k+w/mQv8wyuph6w0--