aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-08-22 15:03:11 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-08-22 15:03:11 +0000
commit3b01959864997c8b74b5a005a01f671227ab64f6 (patch)
tree6c1050e741a176c19b0c25a2877205bb967ce311
parentc25a63a02f081bcf0adc47ba527f624fc411d5cf (diff)
downloadzsh-3b01959864997c8b74b5a005a01f671227ab64f6.tar.gz
zsh-3b01959864997c8b74b5a005a01f671227ab64f6.tar.xz
zsh-3b01959864997c8b74b5a005a01f671227ab64f6.zip
add new _pkgtool, _rar and _vorbis functions from 4.1
-rw-r--r--ChangeLog14
-rw-r--r--Completion/Linux/Command/.distfiles2
-rw-r--r--Completion/Linux/Command/_pkgtool53
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_rar88
-rw-r--r--Completion/Unix/Command/_vorbis91
6 files changed, 248 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f1f34ccc8..2060da77a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,13 @@
2003-07-24 Oliver Kiddle <opk@zsh.org>
+ * 18901: baptiste daroussin (and Nikolai Weibull, 18894):
+ Completion/Unix/Command/_vorbis: new completions for ogg vorbis
+
+ * 18893: baptiste daroussin: Completion/Linux/Command/_pkgtool,
+ Completion/Unix/Command/_rar: improved _pkgtool and new
+ completions for rar/unrar
+
* 18900: Completion/Linux/Command/_iptables,
Completion/Unix/Command/_nmap: new iptables and nmap completions
@@ -105,6 +112,13 @@
* 18811: Completion/Unix/Type/_files: needed to quote % in
substitution as users/6154 caused it to be interpreted as an anchor
+2003-07-04 Peter Stephenson <pws@csr.com>
+
+ * 18807: baptiste daroussin <daroussi@ece.fr>:
+ Completion/Linux/Command/.distfiles,
+ Completion/Linux/Command/_pkgtool: Completion for Slackware
+ package management tool.
+
2003-07-02 Oliver Kiddle <opk@zsh.org>
* 18520, 13691 (Mario Lang), 13701 (Sven):
diff --git a/Completion/Linux/Command/.distfiles b/Completion/Linux/Command/.distfiles
index 5968b219d..a5445a0a7 100644
--- a/Completion/Linux/Command/.distfiles
+++ b/Completion/Linux/Command/.distfiles
@@ -1,4 +1,4 @@
DISTFILES_SRC='
.distfiles
-_losetup _modutils _mondo _uml _valgrind
+_iptables _losetup _modutils _mondo _pkgtool _uml _valgrind
'
diff --git a/Completion/Linux/Command/_pkgtool b/Completion/Linux/Command/_pkgtool
new file mode 100644
index 000000000..146467d36
--- /dev/null
+++ b/Completion/Linux/Command/_pkgtool
@@ -0,0 +1,53 @@
+#compdef installpkg upgradepkg removepkg pkgtool explodepkg makepkg
+
+case "$service" in
+ installpkg)
+ _arguments \
+ '-warn[warn if files would be overwritten, but do not install]' \
+ '-root=[specify alternate install location]:root directory:_path_files -/' \
+ '-infobox[use dialog to draw an info box]' \
+ '-menu[confirm package installation with a menu]' \
+ "-ask[always ask on package installation regardless of package's priority]" \
+ '-priority[provide a priority for the entire package list to use]:priority list:(ADD REC OPT SKP)' \
+ '-tagfile[specify a different file to use for package priorities]:tagfile:_files -/' \
+ '*:package file:_files -g \*.tgz'
+ ;;
+
+ removepkg)
+ _arguments \
+ '-warn[list which files & directories would be removed, skip actual removal]' \
+ '-preserve[reconstruct complete package subtree in /tmp/preserved_packages]' \
+ '-copy[construct a copy of the package in /tmp/preserved_packages]' \
+ '-keep[save the intermediate files created]' \
+ '*:package:_files -W /var/log/packages/ -/'
+ ;;
+
+ upgradepkg)
+ _arguments \
+ '--install-new[install new packages in addition to upgrading existing ones]' \
+ '--reinstall[upgrade even when the same version is already installed]' \
+ '--verbose[show all the gory details of the upgrade]' \
+ '*:package file:_files -g \*.tgz'
+ ;;
+
+ explodepkg)
+ _wanted file expl 'package file' _files -g \*.tgz
+ ;;
+
+ makepkg)
+ _arguments -s \
+ '(--linkadd -l)'{--linkadd,-l}'[move symlinks into doinst.sh]:answer:(y n)' \
+ '(--chown -c)'{--chown,-c}'[reset all permissions to root:root 755]:answer:(y n)'
+ ;;
+
+ pkgtool)
+ _arguments \
+ "-sets[install the disk sets A, B, C]" \
+ "(-source_device)-source_mounted[don't attempt to unmount and remount source device with each disk]" \
+ '-ignore_tagfile[install every package encountered regardless of tagfiles]' \
+ '-tagfile[specify tagfile to be used for the installation]:tagfile:_files -/' \
+ '-source_dir[specify directory containing each disk subdirectory]:source directory:_path_files -/' \
+ '-target_dir[specify directory where the target root directory is located]:target directory:_path_files -W -/' \
+ '(-source_mounted)-source_device[specify source device to install from]:source device:{compadd "$expl[@]" /dev/*}'
+ ;;
+esac
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 854fdd4c1..8eb4718bf 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -20,5 +20,5 @@ _chkconfig _cdcd _irssi _sccs _texinfo _ant
_global _global_tags _figlet _ifconfig _last _larch
_lsof _mt _xmlsoft _elinks _tidy _python
_antiword _renice _sablotron _cdrecord _aap _du
-_subversion
+_rar _vorbis _subversion
'
diff --git a/Completion/Unix/Command/_rar b/Completion/Unix/Command/_rar
new file mode 100644
index 000000000..910989437
--- /dev/null
+++ b/Completion/Unix/Command/_rar
@@ -0,0 +1,88 @@
+#compdef rar unrar
+
+local common
+
+common=(
+ '-ad[append archive name to destination path]'
+ '-ap[set path inside archive]'
+ '-av\-[disable authenticity verification check]'
+ '-c\-[disable comments show]'
+ '-cfg\-[disable read configuration]'
+ '-cl\-[convert names to lower case]'
+ '-cu[convert names to upper case]'
+ '-dh[open shared files]'
+ '-ep[exclude paths from name]'
+ '-f[freshen files]'
+ '-idp[disable percentage display]'
+ '-ierr[send all messages to stderr]'
+ '-inul[disable all messages]'
+ '-kb[keep broken extracted files]'
+ '-o\+[overwrite existing files]'
+ '-o\-[do not overwrite existing files]'
+ '-ow[save or restore file owner and group]'
+ '-p\-[do not query password]'
+ '-r[recurse subdirectorie]'
+ '-ta[process files modified after <date> in YYYYMMDDHHMMSS format]'
+ '-tb[process files modified before <date> in YYYYMMDDHHMMSS format]'
+ '-tn[process files newer than <time>]'
+ '-to[process files older than <time>]'
+ '-u[update files]'
+ '-v[create volumes with size autodetection or list all volumes]'
+ '-ver[file version control]'
+ '-vp[pause before each volume]'
+ '-x[exclude specified file]'
+ '-y[assume yes answer to all queries]'
+)
+
+case $service in
+ unrar)
+ if (( CURRENT == 2 )); then
+ _wanted commands expl 'rar command' compadd e l lt p t v vt x && return
+ else
+ _arguments "$common[@]" '*:RAR files:_files -g \*.rar' && return
+ fi
+ ;;
+ rar)
+ if (( CURRENT == 2 )); then
+ _wanted commands expl 'rar command' compadd \
+ a c cf cw d e f i k l lt m mf p r rc rr rv s t u v vt x && return
+ else
+ _arguments -s \
+ '-ag[generate archive name using the current date]' \
+ '-as[synchronize archive contents]' \
+ '-av[put authenticity verification (registered versions only)]' \
+ '-df[delete files after archiving]' \
+ '-ds[disable name sort for solid archive]' \
+ '-e[set file exclude attributes]' \
+ '-ed[do not add empty directories]' \
+ '-en[do not put end of archive block]' \
+ '-ep1[exclude base directory from names]' \
+ '-ep2[expand paths to full]' \
+ '-hp[encrypt both file data and headers]' \
+ '-ilog[log errors to file (registered versions only)]' \
+ '-isnd[enable sound]' \
+ '-k[lock archive]' \
+ '-m+[set compression level]:compression level:(( 0\:store 1\:fastest 2\:fast 3\:normal 4\:good 5\:maximal ))' \
+ '-md+[dictionary size]:dictionary size (KB):( 64 128 256 512 1024 2048 4096 a b c d e f g )' \
+ '-ms[specify file types to store]' \
+ '-ol[save symbolic links as the link instead of the file]' \
+ '-p[set password]' \
+ '-r0[recurse subdirectories for wildcard names only]' \
+ '-rr[add data recovery record]' \
+ '-rv[create recovery volumes]' \
+ '-s[create solid archive]' \
+ '-se[create solid archive using extension]' \
+ '-sv[create solid archive using volumes]' \
+ '-s\-[disable solid archiving]' \
+ '-sfx[create SFX archive]' \
+ '-t[test files after archiving]' \
+ '-tk[keep original archive time]' \
+ '-tl[set archive time to latest file]' \
+ '-vn[use the old style volume naming scheme]' \
+ '-w+[assign work directory]:work directory:_files -/' \
+ "$common[@]" \
+ '-z+[read archive comment from file]:comment file:_files' \
+ '*:files:_files' && return
+ fi
+ ;;
+esac
diff --git a/Completion/Unix/Command/_vorbis b/Completion/Unix/Command/_vorbis
new file mode 100644
index 000000000..ea7b96dd5
--- /dev/null
+++ b/Completion/Unix/Command/_vorbis
@@ -0,0 +1,91 @@
+#compdef oggenc ogg123 ogginfo oggdec
+
+local expl ret=1
+
+case $service in
+ oggenc)
+ _arguments -s \
+ '(-)'{-h,--help}'[show help]' \
+ '(-r --raw)'{-r,--raw}'[assume input data is raw little-endian audio data 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)' \
+ '--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)' \
+ '--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)' \
+ '--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]' \
+ '(-o --output-file)'{-o,--output-file=}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles' \
+ '(-n --pattern)'{-n,--pattern=}'[specify pattern for producing filenames]:string' \
+ '(-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]' \
+ '*:wav file:_files -g "(#i)*.wav"' && ret=0
+ ;;
+ ogg123)
+ _arguments -C -s \
+ '(-h --help)'{-h,--help}'[show help]' \
+ '(-)'{-V,--version}'[display version information]' \
+ '(-d --device)'{-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)'{-f,--files=}'[output filename for a previously specified file device]:output filename:_files' \
+ '(-k --skip)'{-k,--skip}'[skip the first '\''n'\'' seconds]: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' \
+ '(-z --shuffle)'{-z,--shuffle}'[shuffle play]' \
+ '(-l --delay)'{-l,--delay=}'[set delay]:delay (ms)' \
+ '(-@ --playlist)'{-@,--playlist}'[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' \
+ '*:files:->oggfiles' && ret=0
+ ;;
+ ogginfo)
+ _arguments -C -s \
+ '-h[show a help and usage message]' \
+ '*-q[quiet mode]' \
+ '-v[verbose mode]' \
+ '*:files:->oggfiles' && ret=0
+ ;;
+ oggdec)
+ _arguments -C -s \
+ '(-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\)))' \
+ '*:files:->oggfiles' && ret=0
+ ;;
+esac
+
+case $state in
+ oggfiles)
+ _wanted files expl 'ogg vorbis file' \
+ _files "$expl[@]" -g '(#i)*.ogg' && return
+ ;;
+ devopts)
+ if compset -p '*:'; then
+ _message value
+ else
+ _wanted devopts expl 'device option' \
+ compadd -S : - dsp dev card buf_size host byteorder && return
+ fi
+ ;;
+esac
+
+return ret