fzf icon indicating copy to clipboard operation
fzf copied to clipboard

In tmux, `vim .fzf/**<tab>` search path problem

Open hugeying opened this issue 1 year ago • 1 comments

Checklist

  • [X] I have read through the manual page (man fzf)
  • [X] I have searched through the existing issues
  • [X] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.54.2 (brew)

OS

  • [X] Linux
  • [X] macOS
  • [ ] Windows
  • [ ] Etc.

Shell

  • [X] bash
  • [X] zsh
  • [ ] fish

Problem / Steps to reproduce

set the following:

export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git'
export FZF_DEFAULT_OPTS='--tmux 70%'

In tmux, vim .fzf/**<tab> the search path is in the current directory, not in the .fzf/

img

hugeying avatar Sep 26 '24 02:09 hugeying

I can't reproduce the problem. Please make sure you have the latest version of fzf and that you have set it up using the right method.

https://github.com/junegunn/fzf?tab=readme-ov-file#setting-up-shell-integration

junegunn avatar Nov 28 '24 11:11 junegunn

@junegunn , @hugeying

I have encountered the same issue

fzf v0.57.0 (brew) MacOS zsh

To reproduce:

EDIT: Easy way to reproduce:

fzf --walker=dir,follow --walker-root=../ --tmux

This works as expected

fzf --walker=dir,follow --walker-root=../

More complex way to reproduce:

~/.zshrc:

source <(fzf --zsh)
export FZF_DEFAULT_OPTS='--tmux'

cd ../**<tab> returns files in the current directory, not directories in the child directory. cd my-dir/**<tab> also exhibits the same behaviour

unset FZF_DEFAULT_OPTS resolves the problem

gchan avatar Jan 01 '25 14:01 gchan

I can't reproduce the problem.

Does this work as expected and show files under ..?

tmux display-popup -E -d $(pwd) fzf --walker-root ../

What's your tmux version?

junegunn avatar Feb 09 '25 01:02 junegunn

My reproduction steps above no longer raises the issue for me. And the command you provided also works and displays files under ..

I believe the issue is now resolved but @hugeying can confirm.

I'm now on tmux 3.5a which was released in Oct 5, 2024. I'm unsure which version I was on before but it was likely the same version of tmux.

gchan avatar Feb 09 '25 20:02 gchan

Thanks @gchan for the clarification.

junegunn avatar Feb 10 '25 02:02 junegunn

For clarity, the problem no exists for me on fzf 0.59.0 (brew)

gchan avatar Feb 10 '25 20:02 gchan

Fixed in #4298

junegunn avatar Mar 11 '25 05:03 junegunn