aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicoulaj <julien.nicoulaud@gmail.com>2016-02-04 22:02:41 +0100
committernicoulaj <julien.nicoulaud@gmail.com>2016-02-04 22:02:41 +0100
commitad14cfb6e70ef2444480a0873c5cb69f21511df2 (patch)
treef0cc71c6323381ea3bc8b60bc722667a4df8e1fa /src
parentMerge pull request #346 from nesneros/master (diff)
parentIgnore comments in ansible hosts (diff)
downloadzsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar.gz
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar.bz2
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar.lz
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar.xz
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.tar.zst
zsh-completions-ad14cfb6e70ef2444480a0873c5cb69f21511df2.zip
Merge pull request #347 from sarg/master
Ignore comments in ansible hosts
Diffstat (limited to 'src')
-rw-r--r--src/_ansible2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_ansible b/src/_ansible
index faabf04..a4c59a3 100644
--- a/src/_ansible
+++ b/src/_ansible
@@ -91,7 +91,7 @@ __host_list ()
local -a mixed_host_list
mixed_host_list=$(command \
cat ${HOST_FILE} \
- | awk 'NF && $1 !~ /[\[:=]/ { print $1 }' \
+ | awk 'NF && $1 !~ /^[:space:]*#|[\[:=]/ { print $1 }' \
| sort | uniq)
# compute set difference h1 - h2