diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-08 18:16:55 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-08 18:16:55 +0900 |
commit | ed8202efc6861e0ae5b921819b86d2ad22c35a65 (patch) | |
tree | 07c00f0ab36fad7302087776e97521f2b56e2381 | |
parent | 0937bd6c166c9d8be1fdafa8535460cdd0b28620 (diff) |
[bash-completion] Ignore 0.0.0.0
Close #228
-rw-r--r-- | shell/completion.bash | 4 |
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 } |