mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[zsh/bash-completion] Avoid caret expansion
Close #233 setopt extendedglob on zsh caused caret in grep pattern to be expanded. Problem identified and patch submitted by @lazywei.
This commit is contained in:
parent
8f371ee81c
commit
c14aa99ef6
@ -189,7 +189,7 @@ 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 | \grep -Fv '0.0.0.0') | awk '{if (length($2) > 0) {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
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ EOF
|
||||
|
||||
_fzf_ssh_completion() {
|
||||
_fzf_list_completion "$1" "$2" '+m' << "EOF"
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user