-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
docs: Add PowerShell example #3857
Conversation
Added example for PowerShell and profile location.
I'm not familiar enough with |
I'm guessing you probably need to update documentation in the rust function and it will update everywhere else. src/cli/activate.rs |
@@ -161,5 +161,6 @@ static AFTER_LONG_HELP: &str = color_print::cstr!( | |||
$ <bold>eval "$(mise activate zsh)"</bold> | |||
$ <bold>mise activate fish | source</bold> | |||
$ <bold>execx($(mise activate xonsh))</bold> | |||
$ <bold>(&mise activate pwsh) | Out-String | Invoke-Expression</bold> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the ampersand a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this invokes the command in a non-blocking way. Background Operator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would we want that here? Isn't that going to cause the output to not even be parsed by powershell? even if it was, wouldn't it mean the next command might not have the tools setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also confused why it's at the beginning here but more so why we would want to background this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(mise activate pwsh) | Out-String | Invoke-Expression
works just the same. But it seems Invoke-Expression -Command $(mise activate pwsh | Out-String)
causes an issue with the parameter length. So the piping is preferred.
We can change it to $(mise activate pwsh) | Out-String | Invoke-Expression
if it is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know, I didn't even see it in the README to be honest. Sorry about that. I'm up for either approach. I'm just personally a fan of modifying my own profile script instead of a script adding it to the end. In the end, I was just following the style of the other nearby examples. I hadn't even thought to look outside the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modifying my own profile script instead of a script adding it to the end. In the end
same here, although with mise it actually is important that it gets loaded last or else the tools might not be in the front of PATH so it's good guidance for us to just tell users to put it at the end
It would be nice to see this merged, with the addition of adding instructions to the regular docs here: It was completely by chance that I looked up the github to see if non-shims Windows support was underway. I am a happy mise user in powershell with |
That was quick! Thanks for making software that makes it a joy to use! I have so much fun with mise (normally on a Mac, this time on Windows). |
### 🚀 Features - **(registry)** add jd by [@risu729](https://github.com/risu729) in [#4318](#4318) - **(registry)** add jc by [@risu729](https://github.com/risu729) in [#4317](#4317) - **(registry)** Add qsv cli by [@vjda](https://github.com/vjda) in [#4334](#4334) - add support for idiomatic go.mod file by [@roele](https://github.com/roele) in [#4312](#4312) - add -g short version for unuse cmd by [@kimle](https://github.com/kimle) in [#4330](#4330) - add git remote task provider by [@acesyde](https://github.com/acesyde) in [#4233](#4233) - set usage arguments and flags as environment variables for toml tasks by [@gturi](https://github.com/gturi) in [#4159](#4159) ### 🐛 Bug Fixes - **(aqua)** trim prefix before comparing versions by [@risu729](https://github.com/risu729) in [#4340](#4340) - wrong config file type for rust-toolchain.toml files by [@roele](https://github.com/roele) in [#4321](#4321) ### 🚜 Refactor - **(registry)** use aqua for yq by [@scop](https://github.com/scop) in [#4326](#4326) ### 📚 Documentation - **(schema)** fix description of task.dir default by [@risu729](https://github.com/risu729) in [#4324](#4324) - Add PowerShell example by [@jahanson](https://github.com/jahanson) in [#3857](#3857) - Include "A Mise guide for Swift developers" by [@pepicrft](https://github.com/pepicrft) in [#4329](#4329) - Update documentation for core tools by [@hverlin](https://github.com/hverlin) in [#4341](#4341) - Update vitepress to fix search by [@hverlin](https://github.com/hverlin) in [#4342](#4342) ### Chore - **(bun.lock)** migrate bun lockfiles to text-based by [@risu729](https://github.com/risu729) in [#4319](#4319) ### New Contributors - @vjda made their first contribution in [#4334](#4334) - @kimle made their first contribution in [#4330](#4330) - @pepicrft made their first contribution in [#4329](#4329) - @jahanson made their first contribution in [#3857](#3857)
I added an example for PowerShell and profile location. Please let me know if you have any questions.