summaryrefslogtreecommitdiffstats
path: root/completions/_hexdump
diff options
context:
space:
mode:
Diffstat (limited to 'completions/_hexdump')
-rw-r--r--completions/_hexdump15
1 files changed, 7 insertions, 8 deletions
diff --git a/completions/_hexdump b/completions/_hexdump
index 785f597..939cfa6 100644
--- a/completions/_hexdump
+++ b/completions/_hexdump
@@ -3,29 +3,28 @@
# Use of this file is deprecated on Linux. Upstream completion is
# available in util-linux >= 2.23, use that instead.
-_hexdump()
+_comp_cmd_hexdump()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-V | -e | -n | -s)
return
;;
-f)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
if [[ $cur == -* ]]; then
- local opts="$(_parse_help "$1")"
- COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur"))
+ _comp_compgen_help || _comp_compgen_usage
return
fi
- _filedir
+ _comp_compgen_filedir
} &&
- complete -F _hexdump hexdump hd
+ complete -F _comp_cmd_hexdump hexdump hd
# ex: filetype=sh