-
Notifications
You must be signed in to change notification settings - Fork 5
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
🪟 powershell support #124
Comments
please mommy support powershell~ |
+1 |
i don't want to add explicit powershell support because that would mean i would have to write an entire new script, since powershell cannot run posix ( however, if you have (1) linux subsystem or (2) cygwin or (3) git for windows installed, you can just run the posix script inside there. if you have |
I think the git one would be the most preferable for most. |
i've added instructions on how to use mommy in powershell through either wsl or through git bash. let me know if they work for you and if they're clear enough :-) |
function prompt {"$(& sh mommy -1 -s $([int][bool]::Parse(!$?)))> " } Somehow this works for me and not what you mentioned in the readme. Given that I have sh.exe and mommy in PATH |
I don't need the function if I use Oh-My-Posh. {
"type": "rprompt",
"segments": [
{
"type": "command",
"style": "diamond",
"foreground": "#ffffff",
"background": "#00897b",
"leading_diamond": "\ue0b2",
"trailing_diamond": "\ue0b4",
"properties": {
"shell": "bash",
"command": "mommy"
}
}
]
} |
interesting! thanks for reporting that. i found two mistakes in my code: i wrapped only the mommy executable into quotes instead of the entire command (up to and including the function prompt { "$(& "C:\Program Files\Git\bin\sh.exe" "C:/Users/username/mommy" -1 -s $([int][bool]::Parse(!$?)))> " } it works for me, but having someone else confirm it would be nice :-) as for the oh-my-posh config, thank you for that! i hadn't really looked into it myself, i just knew it existed. do you mind if i include that in the readme? either way i'll add you to the acknowledgements (unless you don't want that) :D |
function prompt {"$(& sh mommy -1 -s $([int][bool]::Parse(!$?)))> " } Somehow only the above code works for me but not if I enter the path manually, as you mentioned in the comment above. |
thanks for trying it out. any chance it's due to missing quotes around spaces? if either way, i think the issue itself is closed, but feel free to reply here with further comments or remarks :-) |
I'm using quotes like you mentioned. But it still doesn't work with manual paths on my end. |
Can't get this to function in my oh my posh but I'm probably missing something stupid.
Can't get this function in my oh-my-posh, but maybe it's because I'm missing something obvious? I have git bash and sh in my path and I threw mommy in there, too. Debug gives me a rendering error 80 with CONFIG ERROR when I try to apply this. Sure it's something silly. Sorry to reopen, but this was the only discussion here related to oh-my-posh and I didn't think it warranted a new topic (as I'm only referencing a minor part of this one) |
@ziasquinn i don't know much about oh-my-posh, but it seems like that is an error specific to your oh-my-posh configuration. perhaps a typo? i read somewhere that running |
So far there is Linux and Unix support, there is windows support but not for Powershell. Any plans on supporting powershell in the future?
The text was updated successfully, but these errors were encountered: