Skip to content

Update Cookbook direnv instructions for new std helper#1878

Merged
fdncred merged 3 commits into
nushell:mainfrom
NotTheDr01ds:direnv-update
Dec 3, 2025
Merged

Update Cookbook direnv instructions for new std helper#1878
fdncred merged 3 commits into
nushell:mainfrom
NotTheDr01ds:direnv-update

Conversation

@NotTheDr01ds
Copy link
Copy Markdown
Contributor

As mentioned in nushell/nushell#15569 - This updates the direnv formula in the Cookbook to utilize the new std/config env-conversions helper.

@NotTheDr01ds NotTheDr01ds added the wait-after-next-release The PR will be merged after next Nu release label Apr 14, 2025
@LemmusLemmus
Copy link
Copy Markdown
Contributor

Nice!

What is to be done with this tip on the page?

you can follow the nu_scripts of Nushell for the always up-to-date version of the hook above

nu-scripts uses a different implementation. In fact, 2 days ago a separate fix was introduced for the nu-scripts implementation.

Currently it would be confusing for users whether to use the solution in the cookbook or the one in nu_scripts. Maybe it would be smart to keep only a single implementation around, considering that this is not the first time that the implementation in the cookbook and nu-scripts have diverged?

@NotTheDr01ds
Copy link
Copy Markdown
Contributor Author

Maybe it would be smart to keep only a single implementation around

That's my thought as well. Seems to be a better fit for the Cookbook, both in terms of discoverability and the fact that the nu_scripts is just a "snippet" more than anything.

@NotTheDr01ds
Copy link
Copy Markdown
Contributor Author

Put in nushell/nu_scripts#1084 to remove the nu_scripts version. Also updated verbage.

WindSoilder pushed a commit to nushell/nushell that referenced this pull request Apr 21, 2025
When combined with [the Cookbook
update](nushell/nushell.github.io#1878), this
resolves #15452

# Description

When we removed the startup `ENV_CONVERSION` for path, as noted in the
issue above, we removed the ability for users to access this closure for
other purposes. This PR adds the PATH closures back as a `std` commands
that outputs a record of closures (similar to `ENV_CONVERSIONS`).

# User-Facing Changes

Doc will be updated and users can once again easily access `direnv`

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Doc PR to be merged when released in 0.104
@LemmusLemmus
Copy link
Copy Markdown
Contributor

Can this also be merged now, since nushell/nu_scripts#1084 has been merged?

@ofek
Copy link
Copy Markdown

ofek commented Dec 3, 2025

It would be great if this could be merged. The tip that this removes contains a link to a file that was removed by the aforementioned PR and I was about to open a fix when I noticed that this change was pending.

cc the most recent commiters @cptpiepmatz @fdncred

@fdncred fdncred merged commit b35ce57 into nushell:main Dec 3, 2025
2 checks passed
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Dec 3, 2025

Thanks

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

Labels

wait-after-next-release The PR will be merged after next Nu release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants