-
Notifications
You must be signed in to change notification settings - Fork 226
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 PowerShell Support #140
Comments
Hey Enrique! I can look into this for you and guide you through it :) Right now we have a file called util_windows.go (and util_unix.go), these define the We'd either have to:
I think the global config option is way easier to implement and less disruptive. I'd go for that as a first step if I were you! And we might have to update the 'selection' as well potentially, not sure about that one. |
Thanks for your response on this @RamiAwar ... I've moved away from PowerShell at the moment, but I am sure this would still be a nice feature for some other people who are working with PowerShell. I can close this ticket if I need to, or I can leave it open to be referenced in a PR. |
I see, yeah no worries! Yeah let's keep it open, I think it's easy to implement and I'll probably get to it later! |
I was trying to use Asking as I found issues with some commands. Thanks! |
@cderv Salut! It's actually meant to work with any shell, we just haven't added Powershell support in an automatic way yet. Right now you could customize it I think by modifying this variable and replacing cmd with the powershell binary. Line 18 in f88549c
I haven't tested on Windows in a while tho, maybe you can try it out and let me know if it works! Then we can document it. |
I am trying to use it on Windows. So let me open issues for problem I am finding. I am not (yet) knowledgeable on GO so opening issues will also help me understand where to look. Or is it better here to open discussion that you then convert to issues ? let me know the guidelines. |
@cderv Feel free to open issues if you think they're different from this one! I'll review them separately. Sorry I didn't mean to suggest you had to modify the source code - I just meant you should try modifying your Pet global settings -> Conf.General.Cmd and set that to the powershell binary (probably just I might have access to a windows machine tonight, might just test this out myself! |
Thanks ! I deduced that looking at source code. Lines 17 to 23 in f88549c
Example of failure
Command would need to be
like Lines 21 to 22 in f88549c
So possibly some switch statement to do the right thing when Hope this helps |
Hello,
Great tool, use it on my MacOS and Linux environment, now I am trying to use it with PowerShell/Windows. I can create new commands entries, however when it comes to
pet exec
the default shell is dos(cmd.exe) and not PowerShell. Still good enough to save the the crazy PowerShell commands I have to remember, however it would be nice to have it execute the command as well.Thanks in advance. If you can guide me through where to make the changes/updates, I can make changes, test, and make a PR if anyone could else would be interested.
--
Enrique
The text was updated successfully, but these errors were encountered: