diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-11 10:17:33 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-11 10:17:33 +0900 |
commit | 64949bf467d172accf2c060dce562ead736535aa (patch) | |
tree | f93b5c0986cda0ee058391fc82c63cb6e49c7057 | |
parent | 732f1339400ee98c6b8c3af7bf6af1752e93fc53 (diff) |
[bash-completion] Allow specifying empty completion trigger (#230)
-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 990852b8..49781c0e 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -87,7 +87,7 @@ _fzf_path_completion() { [ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf" cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g') COMPREPLY=() - trigger=${FZF_COMPLETION_TRIGGER:-**} + trigger=${FZF_COMPLETION_TRIGGER-'**'} cur="${COMP_WORDS[COMP_CWORD]}" if [[ ${cur} == *"$trigger" ]]; then base=${cur:0:${#cur}-${#trigger}} @@ -128,7 +128,7 @@ _fzf_list_completion() { [ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf" read -r src cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g') - trigger=${FZF_COMPLETION_TRIGGER:-**} + trigger=${FZF_COMPLETION_TRIGGER-'**'} cur="${COMP_WORDS[COMP_CWORD]}" if [[ ${cur} == *"$trigger" ]]; then cur=${cur:0:${#cur}-${#trigger}} |