diff options
author | Igor Murzov <e-mail@date.by> | 2011-12-14 19:23:55 +0400 |
---|---|---|
committer | Igor Murzov <e-mail@date.by> | 2011-12-14 19:23:55 +0400 |
commit | 2c4d20a02e3193470440b75032a8baf32a8a8a62 (patch) | |
tree | d3159a104fa769280eb4b06b4cfdea8d89620fbd /completions/cppcheck | |
parent | be085fbe2307da832f00c20b23d1bbba7ff08732 (diff) | |
download | bash-completion-2c4d20a02e3193470440b75032a8baf32a8a8a62.tar.gz |
cppcheck: Several ids separated by commas can be given for --enable=.
Diffstat (limited to 'completions/cppcheck')
-rw-r--r-- | completions/cppcheck | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/completions/cppcheck b/completions/cppcheck index 24b877a4..d3c7a422 100644 --- a/completions/cppcheck +++ b/completions/cppcheck @@ -15,8 +15,16 @@ _cppcheck() return ;; --enable) + # split comma-separated list + split=false + if [[ "$cur" == ?*,* ]]; then + prev="${cur%,*}" + cur="${cur##*,}" + split=true + fi COMPREPLY=( $( compgen -W 'all style performance portability information unusedFunction missingInclude' -- "$cur" ) ) + $split && COMPREPLY=( ${COMPREPLY[@]/#/"$prev,"} ) return ;; --error-exitcode) |