summaryrefslogtreecommitdiffstats
path: root/completions/pngfix
diff options
context:
space:
mode:
Diffstat (limited to 'completions/pngfix')
-rw-r--r--completions/pngfix21
1 files changed, 10 insertions, 11 deletions
diff --git a/completions/pngfix b/completions/pngfix
index 64b5481..d77d80b 100644
--- a/completions/pngfix
+++ b/completions/pngfix
@@ -1,36 +1,35 @@
# pngfix completion -*- shell-script -*-
-_pngfix()
+_comp_cmd_pngfix()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
case $prev in
--suffix | --prefix)
return
;;
--output)
- _filedir
+ _comp_compgen_filedir
return
;;
--strip)
- COMPREPLY=($(IFS='|' compgen -W '$("$1" --help 2>&1 |
- command sed -ne "s/.*--strip=\[\([^]]*\)\].*/\1/p")' \
- -- "$cur"))
+ _comp_compgen_split -F '|' -- "$("$1" --help 2>&1 |
+ command sed -ne 's/.*--strip=\[\([^]]*\)\].*/\1/p')"
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
fi
- _filedir png
+ _comp_compgen_filedir png
} &&
- complete -F _pngfix pngfix
+ complete -F _comp_cmd_pngfix pngfix
# ex: filetype=sh