1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-18 15:21:16 +02:00

22046: descriptions for unrar commands, some additional switches.

This commit is contained in:
Clint Adams 2005-11-29 16:39:20 +00:00
parent fac5d69b8b
commit 582c6d2098
2 changed files with 28 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-11-29 Clint Adams <clint@zsh.org>
* 22046: Completion/Unix/Command/_rar: descriptions for
unrar commands, some additional switches.
2005-11-29 Geoff Wing <gcw@zsh.org> 2005-11-29 Geoff Wing <gcw@zsh.org>
* unposted: Src/utils.c: fix prototype generation for non * unposted: Src/utils.c: fix prototype generation for non

View file

@ -20,6 +20,7 @@ common=(
'-o\+[overwrite existing files]' '-o\+[overwrite existing files]'
'-o\-[do not overwrite existing files]' '-o\-[do not overwrite existing files]'
'-ow[save or restore file owner and group]' '-ow[save or restore file owner and group]'
'-p+:password'
'-p\-[do not query password]' '-p\-[do not query password]'
'-r[recurse subdirectorie]' '-r[recurse subdirectorie]'
'-ta+[process files modified after a date]:date (YYYYMMDDHHMMSS)' '-ta+[process files modified after a date]:date (YYYYMMDDHHMMSS)'
@ -37,9 +38,27 @@ common=(
case $service in case $service in
unrar) unrar)
if (( CURRENT == 2 )); then if (( CURRENT == 2 )); then
_wanted commands expl 'rar command' compadd e l lt p t v vt x && return _values 'rar command' \
'e[extract files to current directory]' \
'l[list archive]' \
'lt[list archive (technical format)]' \
'lb[list archive (bare format)]' \
'p[print file to stdout]' \
't[test archive files]' \
'v[verbosely list archive]' \
'vt[verbosely list archive (technical format)]' \
'vb[verbosely list archive (bare format)]' \
'x[extract files with full path]' && return
else else
_arguments "$common[@]" '*:RAR files:_files -g \*.rar\(-.\)' && return _arguments -S \
'-ep3[expand paths to full including the drive letter]' \
'-idc[disable ___ display]' \
'-idd[disable ___ display]' \
'-idq[disable ___ display]' \
'-n+:file to include:_files' \
'-n@+:file of files to include:_files' \
"$common[@]" \
'*:RAR files:_files -g \*.rar\(-.\)' && return
fi fi
;; ;;
rar) rar)
@ -56,6 +75,7 @@ case $service in
'k[lock archive]' \ 'k[lock archive]' \
'l[list archive]' \ 'l[list archive]' \
'lt[list archive (technical format)]' \ 'lt[list archive (technical format)]' \
'lb[list archive (bare format)]' \
'm[move to archive]' \ 'm[move to archive]' \
'mf[move to archive (files only)]' \ 'mf[move to archive (files only)]' \
'p[print file to stdout]' \ 'p[print file to stdout]' \
@ -68,6 +88,7 @@ case $service in
'u[update files in archive]' \ 'u[update files in archive]' \
'v[verbosely list archive]' \ 'v[verbosely list archive]' \
'vt[verbosely list archive (technical format)]' \ 'vt[verbosely list archive (technical format)]' \
'vb[verbosely list archive (bare format)]' \
'x[extract files with full path]' && return 'x[extract files with full path]' && return
else else
_arguments -S \ _arguments -S \