Skip to content
Myr

[bash-completion] Allow specifying empty completion trigger (#230)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 732f133 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:shell/completion.bash+2 added-2 removed
85 unmodified lines
86 local cur base dir leftover matches trigger cmd fzf87 [ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf"88 cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g')89 COMPREPLY=()90 trigger=${FZF_COMPLETION_TRIGGER:-**}90 trigger=${FZF_COMPLETION_TRIGGER-'**'}91 cur="${COMP_WORDS[COMP_CWORD]}"92 if [[ ${cur} == *"$trigger" ]]; then93 base=${cur:0:${#cur}-${#trigger}}94 eval base=$base
32 unmodified lines
127 local cur selected trigger cmd src fzf128 [ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf"129 read -r src130 cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g')131 trigger=${FZF_COMPLETION_TRIGGER:-**}131 trigger=${FZF_COMPLETION_TRIGGER-'**'}132 cur="${COMP_WORDS[COMP_CWORD]}"133 if [[ ${cur} == *"$trigger" ]]; then134 cur=${cur:0:${#cur}-${#trigger}}135
128 unmodified lines