From ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 3 May 2015 16:53:47 +0200 Subject: 35011: update completions for some common Unix commands, in particular improving FreeBSD support --- Completion/Unix/Command/_od | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_od') 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 -- cgit 1.4.1