rlivings39 / vscode-fzf-quick-open

vscode extension providing quick file/folder open and searching using fzf
MIT License
77 stars 17 forks source link

Maybe there is no need to "escapeWinPath" #23

Closed DaddyTrap closed 4 years ago

DaddyTrap commented 4 years ago

I'm working on Windows. I found that using fzf: Open file using fzf the fzf runs well but when I selected the file, vscode dosen't open the file. Also, I got a error message said "The specified path is invalid." on cmd.

After reading the code, I tried the following operations on cmd:

C:\Users\my_username>echo open $$ F:\Path\To\Workspace $$ server\bin\start.bat > "\\?\pipe\fzf-pipe-21160"

C:\Users\my_username>echo open $$ F:\\Path\\To\\Workspace $$ server\bin\start.bat > "\\?\pipe\fzf-pipe-21160"

C:\Users\my_username>echo open $$ F:\\Path\\To\\Workspace $$ server\bin\start.bat > "\\\\?\\pipe\\fzf-pipe-21160"
The specified path is invalid.

C:\Users\my_username>

It shows that, the first 2 command did work and my vscode opened that start.bat, however, the 3rd one echos an error. But now what the extension produces is like the 3rd one.

I tried modifying function escapeWinPath to make it just return origPath;, and it seems everything works well.

Is it truly necessary to use escapeWinPath on the named pipe and the path to scripts\topipe.bat ?


PS: I think this extension will really save my time! 😆 vscode's Ctrl+P can be very slow when I'm working on a large project.

rlivings39 commented 4 years ago

Thanks for the pointer and glad to hear that this extension will save you time! The escaping logic is needed for Git Bash on Windows so I've added some code to tell what shell is being used.

I think I've addressed everything w/ Windows using CMD as your VSCode shell in v0.4.0. Let me know if you see any other issues.