summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/completion.bash5
-rw-r--r--shell/completion.zsh5
2 files changed, 6 insertions, 4 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 7e46bacf..c489c5a0 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -516,11 +516,12 @@ if ! declare -F __fzf_list_hosts > /dev/null; then
# Note: mawk <= 1.3.3-20090705 does not support the POSIX brackets of
# the form [[:blank:]], and Ubuntu 18.04 LTS still uses this
# 16-year-old mawk unfortunately. We need to use [ \t] instead.
- /^[ \t]*(#|$)|0\.0\.0\.0/ { next }
+ /^[ \t]*(#|$)/ { next }
{
sub(/#.*/, "")
for (i = 2; i <= NF; i++)
- print $i
+ if ($i != "0.0.0.0")
+ print $i
}
' /etc/hosts 2> /dev/null
)
diff --git a/shell/completion.zsh b/shell/completion.zsh
index 3663a610..e0227007 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -294,11 +294,12 @@ if ! declare -f __fzf_list_hosts > /dev/null; then
# Note: mawk <= 1.3.3-20090705 does not support the POSIX brackets of
# the form [[:blank:]], and Ubuntu 18.04 LTS still uses this
# 16-year-old mawk unfortunately. We need to use [ \t] instead.
- /^[ \t]*(#|$)|0\.0\.0\.0/ { next }
+ /^[ \t]*(#|$)/ { next }
{
sub(/#.*/, "")
for (i = 2; i <= NF; i++)
- print $i
+ if ($i != "0.0.0.0")
+ print $i
}
' /etc/hosts 2> /dev/null
)