summaryrefslogtreecommitdiff
path: root/shell/completion.bash
diff options
context:
space:
mode:
Diffstat (limited to 'shell/completion.bash')
-rw-r--r--shell/completion.bash9
1 files changed, 3 insertions, 6 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 31ebc60b..fc8471b1 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -261,12 +261,9 @@ a_cmds="
x_cmds="kill ssh telnet unset unalias export"
# Preserve existing completion
-if [ "$_fzf_completion_loaded" != '0.11.3' ]; then
- # Really wish I could use associative array but OSX comes with bash 3.2 :(
- eval $(complete | command grep '\-F' | command grep -v _fzf_ |
- command grep -E " ($(echo $d_cmds $a_cmds $x_cmds | sed 's/ /|/g' | sed 's/+/\\+/g'))$" | _fzf_orig_completion_filter)
- export _fzf_completion_loaded=0.11.3
-fi
+eval $(complete |
+ sed -E '/-F/!d; / _fzf/d; '"/ ($(echo $d_cmds $a_cmds $x_cmds | sed 's/ /|/g; s/+/\\+/g'))$/"'!d' |
+ _fzf_orig_completion_filter)
if type _completion_loader > /dev/null 2>&1; then
_fzf_completion_loader=1