mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-04 20:40:57 +02:00
42676: deal with system specific arguments in dd completion
This commit is contained in:
parent
563a8d2853
commit
ad9b140213
2 changed files with 101 additions and 16 deletions
|
@ -1,11 +1,14 @@
|
||||||
2018-04-29 Oliver Kiddle <okiddle@yahoo.co.uk>
|
2018-04-29 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* 42676: Completion/Unix/Command/_dd: deal with system
|
||||||
|
specific arguments
|
||||||
|
|
||||||
* 42728: Completion/Unix/Command/_tiff: update options and
|
* 42728: Completion/Unix/Command/_tiff: update options and
|
||||||
add handling for tiff2pdf
|
add handling for tiff2pdf
|
||||||
|
|
||||||
2018-04-29 Barton E. Schaefer <schaefer@zsh.org>
|
2018-04-29 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* Ricardo Giorni: 47201: fix 42355 for multiple backslashes
|
* Ricardo Giorni: 42701: fix 42355 for multiple backslashes
|
||||||
|
|
||||||
2018-04-26 Peter Stephenson <p.stephenson@samsung.com>
|
2018-04-26 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,99 @@
|
||||||
#compdef dd gdd
|
#compdef dd gdd
|
||||||
|
|
||||||
_values -w 'option' \
|
local -a vals conv flags
|
||||||
'if[specify input file]:input file:_tilde_files' \
|
local variant
|
||||||
'of[specify output file]:output file:_tilde_files' \
|
|
||||||
'(bs)ibs[input block size]:block size (bytes)' \
|
_pick_variant -r variant gnu=GNU $OSTYPE --version
|
||||||
'(bs)obs[output block size]:block size (bytes)' \
|
|
||||||
'(ibs obs)bs[block size]:block size (bytes)' \
|
vals=(
|
||||||
'cbs[conversion buffer size]:buffer size (bytes)' \
|
'(ibs obs)bs[block size]:block size (bytes)'
|
||||||
'skip[input blocks initially skipped]:blocks' \
|
'cbs[conversion buffer size]:buffer size (bytes)'
|
||||||
'seek[output blocks initially skipped]:blocks' \
|
'conv[specify conversions to apply]: :_values -s , conversion $conv'
|
||||||
'files[specify number of input files to copy and concatenate]:number of files' \
|
'count[number of input blocks to copy]:blocks'
|
||||||
'count[number of input blocks to copy]:blocks' \
|
'(bs)ibs[input block size]:block size (bytes)'
|
||||||
'conv[specify conversions to apply]:conversion:_values -s , conversion
|
'if[specify input file]:input file:_tilde_files'
|
||||||
"(ebcdic ibm)ascii" "(ascii ibm)ebcdic" "(ascii ebcdic)ibm"
|
'(bs)obs[output block size]:block size (bytes)'
|
||||||
"(unblock)block" "(block)unblock"
|
'of[specify output file]:output file:_tilde_files'
|
||||||
"(ucase)lcase" "(lcase)ucase" swab noerror sync'
|
'seek[output blocks initially skipped]:blocks'
|
||||||
|
'skip[input blocks initially skipped]:blocks'
|
||||||
|
)
|
||||||
|
conv=(
|
||||||
|
'(ascii asciib oldascii ebcdic ebcdicb oldebcdic ibm ibmb oldibm)'{ascii,ebcdic,ibm}
|
||||||
|
'(unblock)block' '(block)unblock'
|
||||||
|
'(ucase)lcase' '(lcase)ucase'
|
||||||
|
swab sync noerror notrunc
|
||||||
|
)
|
||||||
|
|
||||||
|
case $variant in
|
||||||
|
^gnu)
|
||||||
|
vals+=(
|
||||||
|
'files[specify number of input files to copy and concatenate]:number of files'
|
||||||
|
)
|
||||||
|
;|
|
||||||
|
(gnu|darwin|dragonfly|(free|net)bsd*)
|
||||||
|
conv+=( sparse )
|
||||||
|
;|
|
||||||
|
gnu|netbsd*)
|
||||||
|
vals+=(
|
||||||
|
'*iflag[specify read flags]:flag:_sequence compadd - $flags'
|
||||||
|
'*oflag[specify write flags]:flag:_sequence compadd - $flags'
|
||||||
|
)
|
||||||
|
flags=( append direct directory dsync sync nonblock noctty nofollow )
|
||||||
|
;|
|
||||||
|
darwin*|dragonfly*|(free|net)bsd*)
|
||||||
|
vals+=(
|
||||||
|
'oseek[output blocks initially skipped]:blocks'
|
||||||
|
)
|
||||||
|
conv+=(
|
||||||
|
'(ascii oldascii ebcdic oldebcdic oldibm)'old{ascii,ebcdic,ibm}
|
||||||
|
)
|
||||||
|
;|
|
||||||
|
(darwin|dragonfly|freebsd|netbsd|solaris)*)
|
||||||
|
vals+=(
|
||||||
|
'iseek[input blocks initially skipped]:blocks'
|
||||||
|
)
|
||||||
|
;|
|
||||||
|
(open|free)bsd*)
|
||||||
|
vals+=(
|
||||||
|
'status[specify level of information to print to stderr]:level:(none noxfer)'
|
||||||
|
)
|
||||||
|
conv+=( osync )
|
||||||
|
;|
|
||||||
|
|
||||||
|
freebsd*)
|
||||||
|
vals+=(
|
||||||
|
'fillchar[specify padding character]:character'
|
||||||
|
'speed[limit copying speed]:speed (bytes/second)'
|
||||||
|
)
|
||||||
|
conv+=(
|
||||||
|
'(pareven parnone parodd parset)'{pareven,parnone,parodd,parset}
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
gnu)
|
||||||
|
vals+=(
|
||||||
|
'status[specify level of information to print to stderr]:level:(none noxfer progress)'
|
||||||
|
)
|
||||||
|
flags+=( fullblock noatime nocache count_bytes skip_bytes seek_bytes )
|
||||||
|
conv+=( excl nocreat fdatasync fsync )
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
vals+=(
|
||||||
|
'msgfmt[specify format for information summary]:format:(quiet posix human)'
|
||||||
|
'progress[enable progress display]:enable:(1)'
|
||||||
|
)
|
||||||
|
flags+=(
|
||||||
|
wronly rdwr creat trunc excl shlock exlock cloexec nosigpipe rsync alt_io async
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
vals+=(
|
||||||
|
'files[specify number of input files to copy and concatenate]:number of files'
|
||||||
|
'oseek[output blocks initially skipped (via seek, not NUL-padding)]:blocks'
|
||||||
|
)
|
||||||
|
conv+=(
|
||||||
|
'(ascii asciib ebcdic ebcdicb ibmb)'{ascii,ebcdic,ibm}b
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_values -w 'option' $vals
|
||||||
|
|
Loading…
Reference in a new issue