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

Windows fd issue #5

Open
HrMitrev opened this issue Mar 7, 2024 · 3 comments
Open

Windows fd issue #5

HrMitrev opened this issue Mar 7, 2024 · 3 comments

Comments

@HrMitrev
Copy link

HrMitrev commented Mar 7, 2024

Hi!
I like the plugin very much, but when using it under Windows, I got error because fd is not registered correctly.

system('which.fd')[0] returns C

@Yohannfra
Copy link
Owner

Hi,

As far as I know the which command is only available on GNU/linux os so I can understand why it doesn't work on Windows.

I don't have any windows laptop available to try but I'll accept any patch for this issue if you can fix it.

@HrMitrev
Copy link
Author

HrMitrev commented Mar 7, 2024

Hi,

As far as I know the which command is only available on GNU/linux os so I can understand why it doesn't work on Windows.

I don't have any windows laptop available to try but I'll accept any patch for this issue if you can fix it.

You are right, but if you setup scoop you can install packages which add which.exe to $PATH.
I am not experienced with vim syntax, but I can try to do a PR.
One question about the code - how could you add OR statement. Will it be something like:

let fdpath = system('which fd')[0]
if (fdpath ==# '/' || fdpath ==#'C')

@Yohannfra
Copy link
Owner

Yes this is the correct syntax. You can find a very helpful cheatsheet for vimscript here https://devhints.io/vimscript

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

No branches or pull requests

2 participants