Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.34k stars 97 forks source link

[BUG] "3" is always added to fzf when tabbing git switch #327

Closed cedrickring closed 1 year ago

cedrickring commented 1 year ago

Describe the bug

Always when I'm using git switch <TAB>, a "3" is added to fzf without me doing anything extra. Surprisingly, all other git commands don't have this "feature".

I can make sure:

To Reproduce

Steps to reproduce the behavior:

  1. Type '.git switch'
  2. Press Tab
  3. See the "3" pop up

Expected behavior

There shouldn't be a "3" without me typing anything.

Screenshots

output

Environment:

source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit

export FORGIT_LOG_FZF_OPTS='--reverse'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

zstyle ":completion:*:git-checkout:*" sort false
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

# Theme
zinit ice depth=1 
zinit light romkatv/powerlevel10k
zinit snippet ~/.p10k.zsh

zinit snippet "$(brew --prefix asdf)/asdf.sh"
zinit light redxtech/zsh-asdf-direnv

zinit ice as"completion" ; zinit snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker

zinit ice depth=1
zinit load wfxr/forgit
zinit ice depth=1
zinit load Aloxaf/fzf-tab

zinit ice depth=1
zinit load zsh-users/zsh-syntax-highlighting
zinit ice depth=1
zinit load zsh-users/zsh-autosuggestions

zinit snippet OMZP::encode64
zinit snippet OMZP::yarn
zinit snippet OMZL::directories.zsh

autoload -Uz compinit
compinit

zinit cdreplay -q

eval "$(zoxide init zsh --cmd z)"
Aloxaf commented 1 year ago

Can you trigger completion with C-x . and provide the log?

cedrickring commented 1 year ago

For some reason the first letter of a specific branch (in this case a 3) was always added to the fzf completion. As soon as I removed that branch (was no longer needed), the issue suddenly vanished.

iwex commented 8 months ago

@Aloxaf I have the same problem with docker and MacOS I have a container with id 36cd5502fb11 - and I have "3" as a prefilled value in fzf

Aloxaf commented 8 months ago

@Aloxaf I have the same problem with docker and MacOS I have a container with id 36cd5502fb11 - and I have "3" as a prefilled value in fzf

Can you provide th log?

iwex commented 8 months ago

Can you provide th log?

@Aloxaf Just say where can I find it?

iwex commented 8 months ago

zsh-31980-fzf-tab-1.log

Aloxaf commented 8 months ago

Oh, this is an old bug: https://github.com/Aloxaf/fzf-tab/issues/264

You should reinstall your zsh with pcre support.