ansible-roles/nagios-nrpe/files/check-local_completion
William Hirigoyen a867da5ca9
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2612|4|2608|5|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/317//ansiblelint">Evolix » ansible-roles » unstable #317</a>
gitea/ansible-roles/pipeline/head This commit looks good
nagios-nrpe: fix missing quote in check-local completion
2023-08-08 16:53:47 +02:00

13 lines
363 B
Bash

#!/usr/bin/env bash
_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 \$2}" | sed "s/check_//")' -- $cur ) );
}
complete -F _check_local_dynamic_completion check-local