zsh: Fix carapace and fzf-tab compatibility

As mentioned in
https://github.com/carapace-sh/carapace-bin/issues/2819#issuecomment-3092307945,
fzf-tab directory completes are empty if you try to complete on a
directory without any prior input.

I.e.:

`ls -hal ~/.config/a<tab>` shows output (dirs starting with a).
`ls -hal ~/.config/<tab>` is empty.

This fixes the issue by making the query string use the full inserted
value.
This commit is contained in:
Marty Oehme 2025-09-17 16:48:43 +02:00
parent bb8a41725a
commit 5a4d0051be
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -128,6 +128,9 @@ eval "$(zoxide init zsh)"
eval "$(atuin init zsh)"
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
source <(carapace _carapace)
# make fzf-tab compatible with carapace
# see <https://github.com/carapace-sh/carapace-bin/issues/2819#issuecomment-3092307945>
zstyle ':fzf-tab:*' query-string ''
# Speed up autocomplete, force prefix mapping
zstyle ':completion:*' accept-exact '*(N)'