zsh-workers
 help / color / mirror / code / Atom feed
62cf628ecf635e62e557b8af5520bcb00a48e912 blob 2002 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
#compdef xxd

local curcontext="$curcontext" ret=1 arguments

# TODO: permit two hyphens (--autoskip, --groupsize, etc)
# TODO: xxd -<tab> should show '-x' and '-x:' differently - give visual hint that there's a required argument

# Output options compatibility matrix
# 
# 0 - options conflict
# 1 - options coexist
#
# (The matrix is symmetric, so implied values are not shown.)
#
#     bEipru
#    bx10000
#    E-x0001
#    i--x001
#    p---x11
#    r----x0
#    u-----x


arguments=(
    # output options
    '(-b -bits            -i -include -p -postscript -plain -ps -r -reverse -u -uppercase)'{-b,-bits}'[output in binary digits, rather than hex]'
    '(         -E -EBCDIC -i -include -p -postscript -plain -ps -r -reverse              )'{-E,-EBCDIC}'[print human-readable part in EBCDIC rather than ASCII]'
    '(-b -bits -E -EBCDIC -i -include -p -postscript -plain -ps -r -reverse              )'{-i,-include}'[output in C include file style]'
    '(-b -bits -E -EBCDIC -i -include -p -postscript -plain -ps                          )'{-p,-postscript,-plain,-ps}'[read or write a plain hexdump (no line numbers or ASCII rendering)]'

    '(-b -bits -E -EBCDIC -i -include                           -r -reverse -u -uppercase)'{-r,-reverse}'[reverse mode\: read a hex dump and output binary data]'
    '(-b -bits                                                  -r -reverse -u -uppercase)'{-u,-uppercase}'[output upper-case hex digits]'
   
    {-h,-help}'[display usage message]'
    {-v,-version}'[show program version]'
    '*'{-a,-autoskip}"[a single '*' replaces runs of NUL (toggleable)]"
   
    {-c+,-cols}'[output ARG octets per line]:number of octets per line'
    {-g+,-groupsize}'[separate the output every ARG octets]:number of octets per group'
    {-l+,-len}'[output ARG octets]:number of octets to output'
    {-s,-skip,-seek}'[add ARG to file positions in the input]:file offset (absolute or relative)'
   
    ':files:_files'
)

_arguments -S $arguments && ret=0

return ret
debug log:

solving 62cf628 ...
found 62cf628 in https://inbox.vuxu.org/zsh-workers/20141008082016.GC1712@tarsus.local2/

applying [1/1] https://inbox.vuxu.org/zsh-workers/20141008082016.GC1712@tarsus.local2/
diff --git a/Completion/Unix/Command/_xxd b/Completion/Unix/Command/_xxd
new file mode 100644
index 0000000..62cf628

1:15: trailing whitespace.
# 
1:39: trailing whitespace.
   
1:43: trailing whitespace.
   
1:48: trailing whitespace.
   
Checking patch Completion/Unix/Command/_xxd...
Applied patch Completion/Unix/Command/_xxd cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 62cf628ecf635e62e557b8af5520bcb00a48e912	Completion/Unix/Command/_xxd

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).