-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fzf does not select path #4300
Comments
From the video, it appears that everything works as expected until you make a selection. Since If the observation is correct, I would assume that something is interfering with the Lines 166 to 178 in 26bcd0c
Is the bug reproducible in a minimal zsh environment? command env -i "HOME=$HOME" "USER=$USER" "PATH=$PATH" "TERM=$TERM" zsh -f
source <(fzf --zsh)
cd ~/**<PRESS TAB> If the selection works as expected, that suggests something in your shell setup is interfering with Another way is to enable execution tracing by running: source <(fzf --zsh)
# Enable execution tracing. For more details, refer to 'man zshbuiltins'
typeset -ft fzf-completion
# Verbose Execution trace prompt (default: '+%N:%i> '). For more details, refer to 'man zshparam/zshmisc'
PS4=$'\n%B%F{0}+ %D{%T:%3.} %2N:%I%f%b '
cd ~/**<PRESS TAB> Please copy and paste the output here, which should look something like this: cd ~/**
+ 16:34:25:275 fzf-completion:478 local tokens prefix trigger tail matches lbuf d_cmds cursor_pos cmd_word
+ 16:34:25:275 fzf-completion:479 setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
+ 16:34:25:275 fzf-completion:483 tokens=( cd '~/**' )
+ 16:34:25:275 fzf-completion:484 [ 2 -lt 1 ']'
+ 16:34:25:275 fzf-completion:490 trigger='**'
... Also, do you know if it was working previously and broke recently? |
Thank you @LangLangBart for helping out on this. I have pinned down the issue to be related to the following lines in my .zshrc file
I am using fd to generate the list for directory completion. Do you see any immediate problems with this? I understand now this may not be necessarily an fzf problem, but rather a problem at the interface, but any hint would help |
The Lines 156 to 158 in 26bcd0c
Is this issue reproducible if you execute the following commands? command env -i "HOME=$HOME" "USER=$USER" "PATH=$PATH" "TERM=$TERM" zsh -f
_fzf_compgen_dir() {
fd --type=d --hidden --exclude .git . "$1"
}
source <(fzf --zsh)
cd ~/**<PRESS TAB> |
Hi @LangLangBart, yes, the issue is reproducible with the latest commands you give. |
Thanks for confirming it, but I am unable to reproduce it on my end.
Can you also enable execution tracing for the command env -i "HOME=$HOME" "USER=$USER" "PATH=$PATH" "TERM=$TERM" zsh -f
_fzf_compgen_dir() {
fd --type=d --hidden --exclude .git . "$1"
}
source <(fzf --zsh)
typeset -ft __fzf_generic_path_completion
cd ~/**<PRESS TAB> |
Hi @LangLangBart I have the same versions of zsh, fd, and fzf. Here is the output you request (the last 3 lines are produced after I select the path
|
Checklist
man fzf
)Output of
fzf --version
0.60.3 (brew)
OS
Shell
Problem / Steps to reproduce
As you can see from this recording, when I invoke the ** shortcut, and I select a path, this path is not copied across
Screen.Recording.2025-03-06.at.09.04.45.mov
This happens in 3 different terminal emulators using zsh. Do you know how to solve this issue?
The text was updated successfully, but these errors were encountered: