-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Nushell support in shellenv command #19345
Comments
@paaloeye Assuming the desired output is achieved: what would the Nushell equivalent of Heads up that this is probably the type of thing that it will depend on how complex the PR ends up being (i.e. lines of code) as to whether we accept it or not. |
Here is what I ended up with in /opt/homebrew/bin/brew shellenv csh
| lines
| parse --regex 'setenv (\w+) "?(.+)"?;'
| transpose -r
| into record
| load-env That produces roughly the following environment variables:
An attentive reader can see, that Desired output of
Does it answer your question @MikeMcQuaid ? |
@paaloeye It does, thanks! We'll review a PR for this. Assuming you'll be the one creating the PR so closing with that in mind for now. Happy to continue discussion here and/or in the PR. Shout if you need help. |
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.Provide a detailed description of the proposed feature
Essentially, what I'd like to achieve is
brew shellenv
supporting Nushell.Proposed user interface:
Nushell supports loads of formats, and I'm happy to discuss which one suits the best.
csv
is probably the easiest:It would be too too much to ask to provide support for Nushell from Homebrew alone, so we'll provide the PR if the proposed UX is agreed upon
References
What is the motivation for the feature?
Currently, it isn't easy to convert your
zsh
or/andbash
rc files containing brew installation to Nushell.That is mostly due to Nushell not supporting
eval
, and that is not going to change anytime soon.FYI: A similar question has been asked before albeit with broader scope: #17221
How will the feature be relevant to at least 90% of Homebrew users?
Purely based on the number of stars on Github, one can assume that both audiences are of similar sizes. Technology-wise, there is a great level of intersection between the audiences too. I can personally vouch for that.
What alternatives to the feature have been considered?
^/opt/homebrew/bin/brew shellenv | lines | parse 'export {name}="{value}";' | transpose -r | into record | load-env
That doesn't update
$env.PATH
, so you have to update it in yourconfig.nu
.References:
The text was updated successfully, but these errors were encountered: