summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-05-08 18:16:55 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-05-08 18:16:55 +0900
commited8202efc6861e0ae5b921819b86d2ad22c35a65 (patch)
tree07c00f0ab36fad7302087776e97521f2b56e2381 /shell
parent0937bd6c166c9d8be1fdafa8535460cdd0b28620 (diff)
[bash-completion] Ignore 0.0.0.0
Close #228
Diffstat (limited to 'shell')
-rw-r--r--shell/completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 79160987..990852b8 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -183,13 +183,13 @@ _fzf_kill_completion() {
_fzf_telnet_completion() {
_fzf_list_completion '+m' "$@" << "EOF"
- \grep -v '^\s*\(#\|$\)' /etc/hosts | awk '{if (length($2) > 0) {print $2}}' | sort -u
+ \grep -v '^\s*\(#\|$\)' /etc/hosts | \grep -Fv '0.0.0.0' | awk '{if (length($2) > 0) {print $2}}' | sort -u
EOF
}
_fzf_ssh_completion() {
_fzf_list_completion '+m' "$@" << "EOF"
- cat <(cat ~/.ssh/config /etc/ssh/ssh_config 2> /dev/null | \grep -i ^host | \grep -v '*') <(\grep -v '^\s*\(#\|$\)' /etc/hosts) | awk '{print $2}' | sort -u
+ cat <(cat ~/.ssh/config /etc/ssh/ssh_config 2> /dev/null | \grep -i ^host | \grep -v '*') <(\grep -v '^\s*\(#\|$\)' /etc/hosts | \grep -Fv '0.0.0.0') | awk '{if (length($2) > 0) {print $2}}' | sort -u
EOF
}