summaryrefslogtreecommitdiffstats
path: root/completions/nsupdate
diff options
context:
space:
mode:
Diffstat (limited to 'completions/nsupdate')
-rw-r--r--completions/nsupdate20
1 files changed, 9 insertions, 11 deletions
diff --git a/completions/nsupdate b/completions/nsupdate
index 68df333..854e33c 100644
--- a/completions/nsupdate
+++ b/completions/nsupdate
@@ -1,27 +1,25 @@
# bash completion for nsupdate(1) -*- shell-script -*-
-_nsupdate()
+_comp_cmd_nsupdate()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-*[VLprtu])
return
;;
-*k)
- _filedir key
+ _comp_compgen_filedir key
return
;;
-*R)
- cur=${cur:=/dev/}
- _filedir
+ _comp_compgen -c "${cur:-/dev/}" filedir
return
;;
-*y)
if [[ $cur == h* ]]; then
- COMPREPLY=($(compgen -W "hmac-{md5,sha{1,224,256,384,512}}" \
- -S : -- "$cur"))
+ _comp_comtpen -- -W "hmac-{md5,sha{1,224,256,384,512}}" -S :
[[ ${COMPREPLY-} == *: ]] && compopt -o nospace
fi
return
@@ -29,12 +27,12 @@ _nsupdate()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur"))
+ _comp_compgen_usage
return
fi
- _filedir
+ _comp_compgen_filedir
} &&
- complete -F _nsupdate nsupdate
+ complete -F _comp_cmd_nsupdate nsupdate
# ex: filetype=sh