summaryrefslogtreecommitdiffstats
path: root/completions/perltidy
diff options
context:
space:
mode:
Diffstat (limited to 'completions/perltidy')
-rw-r--r--completions/perltidy46
1 files changed, 27 insertions, 19 deletions
diff --git a/completions/perltidy b/completions/perltidy
index 4404cf8..5be5281 100644
--- a/completions/perltidy
+++ b/completions/perltidy
@@ -1,41 +1,49 @@
# perltidy(1) completion -*- shell-script -*-
-_perltidy()
+_comp_cmd_perltidy()
{
- local cur prev words cword
- _init_completion -n = || return
+ local cur prev words cword comp_args
+ _comp_initialize -n = -- "$@" || return
case $prev in
-h | --help)
return
;;
-o)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
case $cur in
- -pro=*)
- cur="${cur#*=}"
- _filedir
+ -pro=* | --profile=*)
+ _comp_compgen -c "${cur#*=}" filedir
return
;;
- -ole=*)
- COMPREPLY=($(compgen -W 'dos win mac unix' -- "${cur#*=}"))
+ -ole=* | --output-line-ending=*)
+ _comp_compgen -c "${cur#*=}" -- -W 'dos win mac unix'
return
;;
- -bt=* | -pt=* | -sbt=* | -bvt=* | -pvt=* | -sbvt=* | -bvtc=* | -pvtc=* | -sbvtc=* | \
- -cti=* | -kbl=* | -vt=*)
- COMPREPLY=($(compgen -W '0 1 2' -- "${cur#*=}"))
+ -bt=* | --brace-tightness=* | -pt=* | --paren-tightness=* | \
+ -sbt=* | --square-bracket-tightness=* | \
+ -bvt=* | --brace-vertical-tightness=* | \
+ -pvt=* | --paren-vertical-tightness=* | \
+ -sbvt=* | --square-bracket-vertical-tightness=* | \
+ -bvtc=* | --brace-vertical-tightness-closing=* | \
+ -pvtc=* | --paren-vertical-tightness-closing=* | \
+ -sbvtc=* | --square-bracket-vertical-tightness-closing=* | \
+ -cti=* | --closing-token-indentation=* | \
+ -kbl=* | --keep-old-blank-lines=* | \
+ -vt=* | --vertical-tightness=*)
+ _comp_compgen -c "${cur#*=}" -- -W '0 1 2'
return
;;
- -vtc=*)
- COMPREPLY=($(compgen -W '0 1' -- "${cur#*=}"))
+ -vtc=* | --vertical-tightness-closing=*)
+ _comp_compgen -c "${cur#*=}" -- -W '0 1'
return
;;
- -cab=*)
- COMPREPLY=($(compgen -W '0 1 2 3' -- "${cur#*=}"))
+ -cab=* | --comma-arrow-breakpoints=*)
+ _comp_compgen -c "${cur#*=}" -- -W '0 1 2 3'
return
;;
-*=)
@@ -44,12 +52,12 @@ _perltidy()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- _filedir 'p[lm]|t'
+ _comp_compgen_filedir 'p[lm]|t'
fi
} &&
- complete -F _perltidy perltidy
+ complete -F _comp_cmd_perltidy perltidy
# ex: filetype=sh