From cdeb4292e9e1c1f1e8ec64097d40307f682311f1 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 13 Apr 2013 20:54:36 +0100 Subject: hexdump: add long options to the command Includes update to bash completion, and manual as well. Signed-off-by: Sami Kerola --- bash-completion/hexdump | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'bash-completion/hexdump') diff --git a/bash-completion/hexdump b/bash-completion/hexdump index 0c91187f1..aa6f8cefd 100644 --- a/bash-completion/hexdump +++ b/bash-completion/hexdump @@ -5,25 +5,37 @@ _hexdump_module() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" case $prev in - '-e') + '-e'|'--format') COMPREPLY=( $(compgen -W "format" -- $cur) ) return 0 ;; - '-n') + '-n'|'--length') COMPREPLY=( $(compgen -W "length" -- $cur) ) return 0 ;; - '-s') + '-s'|'--skip') COMPREPLY=( $(compgen -W "offset" -- $cur) ) return 0 ;; - '-V') + '-V'|'--version'|'-h'|'--help') return 0 ;; esac case $cur in -*) - OPTS="-b -c -C -d -o -x -e -f -n -s -v -V" + OPTS=" --one-byte-octal + --one-byte-char + --canonical + --two-bytes-decimal + --two-bytes-octal + --two-bytes-hex + --format + --format-file + --length + --skip + --no-squeezing + --version + --help" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;; -- cgit v1.2.3-55-g7522