Skip to content

Commit

Permalink
fix: use double brackets to avoid 'too many arguments' error
Browse files Browse the repository at this point in the history
An error occured when the trigger was assigned to '('
  • Loading branch information
LangLangBart committed Nov 12, 2024
1 parent 4024a29 commit e299a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shell/completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ fzf-completion() {

# Explicitly allow for empty trigger.
trigger=${FZF_COMPLETION_TRIGGER-'**'}
[ -z "$trigger" -a ${LBUFFER[-1]} = ' ' ] && tokens+=("")
[[ -z $trigger && ${LBUFFER[-1]} == ' ' ]] && tokens+=("")

# When the trigger starts with ';', it becomes a separate token
if [[ ${LBUFFER} = *"${tokens[-2]-}${tokens[-1]}" ]]; then
Expand Down

0 comments on commit e299a5a

Please sign in to comment.