Skip to content
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

Missing directory slashes when completion chosen #3859

Open
4 of 10 tasks
timabell opened this issue Jun 13, 2024 · 5 comments
Open
4 of 10 tasks

Missing directory slashes when completion chosen #3859

timabell opened this issue Jun 13, 2024 · 5 comments
Labels

Comments

@timabell
Copy link

Checklist

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

Output of fzf --version

0.53.0 (c4a9ccd)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Thanks for the fab tool.

For a new windows install I'm working on I am getting the backslashes that separate directories all go missing when I hit enter to choose an entry which then means the path is corrupted.

I have done a load of searching and can't find any mention of this being an issue anywhere or what it might be. I don't know enough about how fzf works to guess further so any ideas welcome.

Begin a completion with file **<tab>:
image

Hit enter to choose an item in a subfolder and all the slashes are missing:
image

Curiously if I call fzf directly and then search it works fine:

image

image

This is my dotmatrix config for the windows machine (windows branch) at time of writing https://github.com/timabell/dotmatrix/blob/0c0de5b7107de4a43c22f1f6c727b2537ffc1056/.zshrc#L107

@timabell timabell changed the title Missing diretcory slashes when completion chosen Missing directory slashes when completion chosen Jun 13, 2024
@junegunn
Copy link
Owner

Is this WSL? Looks like you're running an fzf binary for Windows that uses backslash as the file separator. How did you install fzf?

@junegunn
Copy link
Owner

You should be using Linux binary on WSL. It works for me fine.

image

@junegunn
Copy link
Owner

Please comment if you still have the problem with a linux binary.

@timabell
Copy link
Author

timabell commented Jun 19, 2024

Hi, thanks for responding, this is not WSL, this is zsh installed directly on windows, being used in windows terminal.

Yes this is still an issue.

I am unable to use WSL because it's a Virtual Box windows image, and for some reason I can't get the nested virtualisation to work.

I think I installed it with the shallow clone as per the instructions - https://github.com/timabell/dotmatrix/blob/2e554b3093b4d0f8c53f8f2730f0aef63c9e4774/software/fzf.sh#L5-L6 - let me know if you want me to check anything on the windows machine to add more details.

@junegunn junegunn reopened this Jun 19, 2024
@junegunn
Copy link
Owner

junegunn commented Jun 20, 2024

Oh, so does zsh transform the path separators on Windows so you can access paths in Unix style? If that is the case, the Window binary of fzf needs a way to use forward-slashes instead.

Related: BurntSushi/ripgrep#1667 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants