mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 00:51:05 +02:00
33396: new xxd completion
This commit is contained in:
parent
df5d69f50f
commit
0cb4c23b39
2 changed files with 47 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
2014-10-10 Oliver Kiddle <opk@zsh.org>
|
2014-10-10 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* Daniel Shahaf: 33396: Completion/Unix/Command/_xxd: new completion
|
||||||
|
|
||||||
* Yuri D'Elia: 33397: Completion/X/Command/_xautolock: new completion
|
* Yuri D'Elia: 33397: Completion/X/Command/_xautolock: new completion
|
||||||
|
|
||||||
2014-10-09 Frank Terbeck <ft@bewatermyfriend.org>
|
2014-10-09 Frank Terbeck <ft@bewatermyfriend.org>
|
||||||
|
|
45
Completion/Unix/Command/_xxd
Normal file
45
Completion/Unix/Command/_xxd
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
#compdef xxd
|
||||||
|
|
||||||
|
local arguments
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# xxd supports either double or single dashes on long options.
|
||||||
|
[[ -prefix -- ]] && compset -P -
|
||||||
|
|
||||||
|
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}'[specify number of octets per line]: :_guard "[0-9a-fA-Fx]#" "number of octets per line"'
|
||||||
|
{-g+,-groupsize}'[specify the number of octets per group]: :_guard "[0-9]#" "number of octets per group"'
|
||||||
|
{-l+,-len}'[specify number of octets to output]: :_guard "[0-9]#" "number of octets to output"'
|
||||||
|
{-s,-skip,-seek}'[specify file offset to dump from]: :_guard "[0-9]#" "file offset to dump from (absolute or relative)"'
|
||||||
|
|
||||||
|
':files:_files'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -S $arguments
|
Loading…
Reference in a new issue