-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperlcritic
44 lines (36 loc) · 2.04 KB
/
perlcritic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Completion for cpanm:
#
# perlcritic [-12345 | --brutal | --cruel | --harsh | --stern | --gentle]
# [--severity number | name] [{-p | --profile} file | --noprofile]
# [--top [ number ]] [--theme expression] [--include pattern]
# [--exclude pattern] [{-s | --single-policy} pattern]
# [--only | --noonly] [--profile-strictness {warn|fatal|quiet}]
# [--force | --noforce] [--statistics] [--statistics-only]
# [--count | -C] [--verbose {number | format}] [--allow-unsafe]
# [--color | --nocolor] [--pager pager] [--quiet]
# [--color-severity-highest color_specification]
# [--color-severity-high color_specification]
# [--color-severity-medium color_specification]
# [--color-severity-low color_specification]
# [--color-severity-lowest color_specification]
# [--files-with-violations | -l]
# [--files-without-violations | -L]
# [--program-extensions file_name_extension]
# {FILE | DIRECTORY | STDIN}
# perlcritic --profile-proto
# perlcritic { --list | --list-enabled | --list-themes | --doc pattern [...] }
# perlcritic { --help | --options | --man | --version }
_perlcritic()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
#
# The basic options we can complete
#
opts="--brutal --cruel --harsh --stern --gentle --severity --profile --noprofile --top --theme --include --exclude --single-policy --only --noonly --profile-strictness --force --noforce --statistics --statistics-only --count --verbose --allow-unsafe --color --nocolor --pager --quiet --color-severity-lowest --color-severity-low --color-severity-medium --color-severity-high --color-severity-highest --files-without-violations --files-with-violations --program-extensions --profile-proto --list --list-themes --list-enabled --doc --help --options --version"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _perlcritic perlcritic