-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat: Add nushell completion #1599
Conversation
- Add nushell completion - Stop guessing shell, and make `--shell` required - Adapt instructions I have a version local that still tries to guess the shell from the `$SHELL` env var. But it made the code much more verbose, and I am not a fan of that behavior. On my system `$SHELL` gives `/bin/bash` even though I use nushell. I also adapted the instructions to stop suggesting that your choice of shell is platform dependent. Every listed shell can be used on Windows and vice-versa.
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.
A a rule of thumb I think we should always prefer sane defaults over having to specify a value explicitly because its something else to understand or learn.
I think having to specify the --shell
explicitly moves the burden to specify the shell to the user whereas most of the time we can just detect it. If the shell is not properly detected I would consider that a bug instead. Perhaps you can use the logic in rattler_shell
to detect the active shell? I think it contains more logic than just checking $SHELL
? It also properly detects the shell when using pixi shell
. I would be fine with erroring out if the shell cannot be detected though, instead of defaulting to bash.
I also think that although you are technically correct that any shell can be used on Windows we should still keep the tabs in the documentation. I think most users will not be running fish or zsh under windows. And the ones that do will most likely also understand to look under the linux tab. Or we could add a note about it.
Besides that for a starting user having just a single line (especially on Windows) is much less scary than having a whole bunch of echo statements. We want to make it as easy as possible for users.
In general, I agree. For this specific case, I argue we gain nothing.
Thanks for the feedback, I restructured the docs and like it much more now. |
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.
Ok you convinced me, lets just merge and see if someone complains.
Ill let @ruben-arts review the documentation changes. They LGTM.
Corresponding to prefix-dev/pixi#1599
Corresponding to prefix-dev/pixi#1599
Corresponding to prefix-dev/pixi#1599
Nice find @tdejager. |
--shell
requiredI have a version local that still tries to guess the shell from the
$SHELL
env var. But it made the code much more verbose, and I am not a fan of that behavior. On my system,$SHELL
gives/bin/bash
even though I use nushell.I also adapted the instructions to stop suggesting that your choice of shell is platform dependent. Every listed shell can be used on Windows and vice versa.