[bash] Fix regression in dynamic completion

Fix #3674
pull/3649/head
Junegunn Choi 2 months ago
parent c5b197078a
commit 6ce8d49d1b
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -387,6 +387,7 @@ _fzf_complete() {
type -t "$post" > /dev/null 2>&1 || post='command cat'
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cmd="${COMP_WORDS[0]}"
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]] && [[ $cur != *'$('* ]] && [[ $cur != *':='* ]] && [[ $cur != *'`'* ]]; then
cur=${cur:0:${#cur}-${#trigger}}

Loading…
Cancel
Save