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

preview.sh is inaccessible under Windows by default. #1536

Open
5 tasks done
mbilyanov opened this issue Apr 11, 2024 · 3 comments
Open
5 tasks done

preview.sh is inaccessible under Windows by default. #1536

mbilyanov opened this issue Apr 11, 2024 · 3 comments
Labels

Comments

@mbilyanov
Copy link

mbilyanov commented Apr 11, 2024

Under Windows, I'm unable to get a preview by running the default :Files command.

Following further investigation, I found out that it is possible to run the preview.sh file but with the following modification.

bash /mnt/c/Users/milen/.cache/dein/repos/github.com/junegunn/fzf.vim/bin/preview.sh

In fact, anything will work when the /mnt/c/ section is provided even with a simpler path. So the following also works.

bash /mnt/c/Users/milen/preview.sh

So the command(s) above are working, however the defaults are unable to execute preview.sh. What would be the simplest way to pass that information to fzf.vim.

@mbilyanov
Copy link
Author

So this is working:

command! -bang -nargs=? -complete=dir MyFiles
    \ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'bash /mnt/c/Users/milen/preview.sh {}']}, <bang>0)

@mbilyanov
Copy link
Author

mbilyanov commented Apr 11, 2024

But it is not working when in drive W:\.

When using the preview.sh, I'm getting the following error:
<3>WSL (34590) ERROR: CreateProcessParseCommon:711: Failed to translate W:\

I can confirm the following is working on drive W:\.
command! -bang -nargs=? -complete=dir Files call fzf#run(fzf#wrap({'options': ['--preview', 'bat {}']}))

@junegunn
Copy link
Owner

Can you update fzf and fzf.vim to the latest and see if it helps?

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