summaryrefslogtreecommitdiffstats
path: root/completions/optipng
diff options
context:
space:
mode:
Diffstat (limited to 'completions/optipng')
-rw-r--r--completions/optipng27
1 files changed, 13 insertions, 14 deletions
diff --git a/completions/optipng b/completions/optipng
index 0f6b40e..a81ffa2 100644
--- a/completions/optipng
+++ b/completions/optipng
@@ -1,52 +1,51 @@
# optipng(1) completion -*- shell-script -*-
-_optipng()
+_comp_cmd_optipng()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-'?' | -h | --help | -f)
return
;;
-o)
- COMPREPLY=($(compgen -W '{0..7}' -- "$cur"))
+ _comp_compgen -- -W '{0..7}'
return
;;
-out | -log)
- _filedir
+ _comp_compgen_filedir
return
;;
-dir)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
-i)
- COMPREPLY=($(compgen -W '0 1' -- "$cur"))
+ _comp_compgen -- -W '0 1'
return
;;
-zc | -zm)
- COMPREPLY=($(compgen -W '{1..9}' -- "$cur"))
+ _comp_compgen -- -W '{1..9}'
return
;;
-zw)
- COMPREPLY=($(compgen -W '256 512 1k 2k 4k 8k 16k 32k' \
- -- "$cur"))
+ _comp_compgen -- -W '256 512 1k 2k 4k 8k 16k 32k'
return
;;
-strip)
- COMPREPLY=($(compgen -W 'all' -- "$cur"))
+ _comp_compgen -- -W 'all'
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
return
fi
- _filedir '@(png|bmp|gif|pnm|tif?(f))'
+ _comp_compgen_filedir '@(png|bmp|gif|pnm|tif?(f))'
} &&
- complete -F _optipng optipng
+ complete -F _comp_cmd_optipng optipng
# ex: filetype=sh