nagios-nrpe: improve check-local completion
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2611|3|2608|5|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/310//ansiblelint">Evolix » ansible-roles » unstable #310</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
William Hirigoyen 2023-07-28 12:01:13 +02:00
parent e6ef4396f3
commit 7e193e4916

View file

@ -4,7 +4,7 @@ _check_local_dynamic_completion() {
local cur;
cur=${COMP_WORDS[COMP_CWORD]};
COMPREPLY=();
COMPREPLY=( $( compgen -W '$(grep check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=_]" "{print \$3}")' -- $cur ) );
COMPREPLY=( $( compgen -W '$(grep "\[check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) );
}
complete -F _check_local_dynamic_completion check-local