Closed jminer closed 2 years ago
I use Visual Studio Code, and I have to pass the --wait option to use it with pipe-rename. However, if I try doing that, I get an error:
--wait
PS C:\Files> $env:EDITOR="code.exe --wait" PS C:\Files> renamer *.txt Error: Failed to execute editor process Caused by: The system cannot find the file specified. (os error 2)
I found that, as a workaround, I can create a batch file, say code-wait.bat, containing
code-wait.bat
code --wait %1
and then set EDITOR to it:
PS C:\Files> $env:EDITOR="code-wait.bat"
And then it works, but I'd rather not have to use the batch file. I may try to fix this someday if no one else does.
I'm using Windows 10 and pipe-rename 1.3.0 (updated today from crates.io).
BTW, I love the idea of pipe-rename! Thanks for writing and releasing it!
This is a really interesting case, I don't see why we couldn't call the $EDITOR as a command and not as a file, I'd welcome a PR for this, otherwise I'll try to get to it.
Glad you like the idea!
I use Visual Studio Code, and I have to pass the
--wait
option to use it with pipe-rename. However, if I try doing that, I get an error:I found that, as a workaround, I can create a batch file, say
code-wait.bat
, containingand then set EDITOR to it:
And then it works, but I'd rather not have to use the batch file. I may try to fix this someday if no one else does.
I'm using Windows 10 and pipe-rename 1.3.0 (updated today from crates.io).
BTW, I love the idea of pipe-rename! Thanks for writing and releasing it!