diff options
author | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:47 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:57 +0200 |
commit | ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 (patch) | |
tree | 837b14c838b96728ebdb530eb20d35737ef8419b /Completion/Unix/Command/_od | |
parent | b29278c69a67089ba225a98478069eb3f32ab4e6 (diff) | |
download | zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.gz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.xz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.zip |
35011: update completions for some common Unix commands,
in particular improving FreeBSD support
Diffstat (limited to 'Completion/Unix/Command/_od')
-rw-r--r-- | Completion/Unix/Command/_od | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_od b/Completion/Unix/Command/_od index 59775abf6..db75b3f96 100644 --- a/Completion/Unix/Command/_od +++ b/Completion/Unix/Command/_od @@ -1,4 +1,4 @@ -#compdef od +#compdef od god local curcontext="$curcontext" state state_descr line args ret=1 local -A opt_args @@ -25,6 +25,8 @@ if _pick_variant gnu=GNU unix --version; then # -h -B -I and -L are obsolescent and undocumented args=( ${(R)args:#(|\*)(|\(*\))-[hBIL]*} ) args+=( + '--traditional' + '--endian=[swap input bytes]:endianess:(big little)' {-S+,--strings=-}'[output strings of at least specfied bytes long]:length' {-w-,--width=-}'[output specified bytes per line]:bytes' '(- : *)--help[display help and exit]' @@ -33,18 +35,29 @@ if _pick_variant gnu=GNU unix --version; then else args=( ${(R)args:#(|\*)(|\(*\))--*} ) # remove long options case "$OSTYPE" in - (darwin*|freebsd*|dragonfly*|openbsd*) + darwin*|freebsd*|dragonfly*|openbsd*) args+=( - '-D[output unsigned decimal ints (-t u4)]' + '-D[output unsigned decimal integers (-t u4)]' {-e,-F}'[output double-precision floats (-t fD)]' {-H,-X}'[output hexadecimal ints (-t x4)]' '-O[output octal ints (-t o4)]' ) - ;; + ;; + solaris*) + args=( + ${(M)args:#(|\*)(|\(*\))-[AjNtvbcdfosx]*} + '-C[output all printable characters and use C-style escapes]' + '-D[output unsigned decimal long words (-t u4)]' + '-F[output double-precision floats (-t f8)]' + '-O[output octal ints (-t o4)]' + '-S[output decimal ints (-t d4)]' + '-X[output hexadecimal ints (-t x4)]' + ) + ;; (*) # POSIX options only args=( ${(M)args:#(|\*)(|\(*\))-[AjNtvbcdosx]*} ) - ;; + ;; esac fi |