-
Notifications
You must be signed in to change notification settings - Fork 229
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
command to edit does not work on Windows unless configuring a Unix-like editor #314
Comments
Hmm interesting, wonder why we don't clean up the args when using the generic command from conf. Will look into this one. Tricky to change tho as it might break for people depending on it |
I can confirm similar behaviour on MacOS - I have VSCode configured for edit and it's opening This seems to be "working as designed", i.e. when added a print statement, it shows clearly that
This must have been thought as an aid to move the cursor to the end of the snippets file, +3 lines after the last line, see:
As per
Eventually, I'd fix this in an easiest possible way:
Raised a PR for this: #319 Best regards, |
Indeed @jaroslawhartman , the +0 is added for editors like vi, vim, nano, etc. to jump to the end of the file where the new snippet is inserted and put the cursor in a place where the user can just start typing. I think the most straightforward solution to this would be to add some conditionals there, depending on the editor that's being used. |
Fix for #314 - unnecessary +0 as a cmd parameter in editFile
Privileged issue
Discussionsanother issue to create an issue here.Issue Content
Related to
but it does not work on Powershell nor CMD/
(error in french, but basically command run is not windows compatible)
This is because the function to edit file is not Windows compatible
pet/cmd/util.go
Lines 17 to 22 in f88549c
Configuring the editor can help if using one supportin
+<line>
work - like a Unix-like one(
vim
or equivalent can be made installed with Scoop)Then I can make it work with CMD (default).
It could be good to be able to support for Windows notepad or any other program like VSCOE (
Editor = "code"
).The text was updated successfully, but these errors were encountered: