[bash] Fix regression in dynamic completion

Fix #3674
This commit is contained in:
Junegunn Choi 2024-03-13 08:31:14 +09:00
parent c5b197078a
commit 6ce8d49d1b
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 1 additions and 0 deletions

View File

@ -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}}