Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/opamPublic
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Nushell support#6330

Open
benjamin-voisin wants to merge2 commits intoocaml:master
base:master
Choose a base branch
Loading
frombenjamin-voisin:nushell_support

Conversation

benjamin-voisin
Copy link

This change make the commandopam env work withinnushell by typing

load-env (opam env | from json)

It does not add full nushell support, only for theenv command, but it’s the first step. I don’t know that much about the code of opam and could not figure out where to make the other changes neccessary / when they are called, so this is open to improvments.

NOTE: nushell still has some breaking changes sometimes, so I don’t know how this will hold up to the future, but I am certain that it will be easier to change an existing implementation.

@rjbourjbou self-requested a reviewDecember 16, 2024 13:16
@rjbou
Copy link
Collaborator

Thanks for the PR!

This change make the commandopam env work withinnushell by typing

load-env (opam env | from json)

If you don't want to add full support, just need a json output to be able to populate nushell environment, you can take a look tothis comment, we have in mind to have something similar for CIs.

It does not add full nushell support, only for theenv command, but it’s the first step. I don’t know that much about the code of opam and could not figure out where to make the other changes neccessary / when they are called, so this is open to improvments.

The other places where a change is needed are for generating the init scripts. they are generated atopam init stage, in order to have some automatic loading in *rc file (completion, environment handling, automatic environment update, etc.).
You can find exampleshere in the init scripts test.

NOTE: nushell still has some breaking changes sometimes, so I don’t know how this will hold up to the future, but I am certain that it will be easier to change an existing implementation.

If nushell users are willing to tell us when there is some update to do, and what are they, this is ok. It is hard for us to maintain a shell we don't use :).
Note that, ftm, opam has a release cycle of ~6 months. So breakages fix won't be immediately available.

@rjbourjbou added the PR: WIPNot for merge at this stage labelJan 16, 2025
@@ -76,6 +76,7 @@ users)
## Clean

## Env
* [NEW] Add support for nushell in the opam env command
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
*[NEW] Add support for nushell in the opam env command
*[NEW] Add support for nushell in the opam env command[#6330@benjamin-voisin]

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rjbourjbourjbou left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
PR: WIPNot for merge at this stage
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@benjamin-voisin@rjbou

[8]ページ先頭

©2009-2025 Movatter.jp