Skip to content

fix: add miscellaneous fixes before implementing _comp_compgen -P #1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 17, 2025
13 changes: 2 additions & 11 deletions completions/cppcheck
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,8 @@ _comp_cmd_cppcheck()
return
;;
--enable)
# split comma-separated list
local split=""
if [[ $cur == ?*,* ]]; then
prev="${cur%,*}"
cur="${cur##*,}"
split="set"
fi
_comp_compgen -- -W 'all warning style performance portability
information unusedFunction missingInclude' &&
[[ $split ]] &&
_comp_compgen -Rv COMPREPLY -- -P "$prev," -W '"${COMPREPLY[@]}"'
_comp_delimited , -W 'all warning style performance portability
information unusedFunction missingInclude'
return
;;
--error-exitcode)
Expand Down