Skip to content

docs: Update install instructions for nushell#5981

Merged
jdx merged 1 commit into
jdx:mainfrom
Joniator:patch-1
Aug 11, 2025
Merged

docs: Update install instructions for nushell#5981
jdx merged 1 commit into
jdx:mainfrom
Joniator:patch-1

Conversation

@Joniator

Copy link
Copy Markdown
Contributor

This PR should have fixed the path issues, but the problem described in this discussion was not fixed.

The issue doesn't persist if the file is autoloaded, but the documentation currently describes the old way of importing the file with use. This updates the docs to write the autoload-way into the nu config

Copilot AI review requested due to automatic review settings August 11, 2025 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the nushell installation instructions for mise to use the autoload directory instead of the manual use command approach, addressing path issues that persist with the previous method.

  • Replaces multi-line installation steps with a single command that saves to the autoload directory
  • Removes the manual use command approach that was causing path-related problems

Comment thread docs/installing-mise.md
@jdx

jdx commented Aug 11, 2025

Copy link
Copy Markdown
Owner

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@jdx

jdx commented Aug 11, 2025

Copy link
Copy Markdown
Owner

@JoaquinTrinanes @atty303 @samuelallan72 @finalchild @texastoland (people that have contributed to nushell)

can any of you have a glance at this and see if it seems reasonable? I don't know enough about nushell to properly review it myself

@atty303

atty303 commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Yes, this code is essentially the same as the one I use for initialization, and there is no problem with it.

# Generate vendor/autoload scripts
const vendor_autoload = $nu.data-dir | path join vendor autoload

if (which mise | is-not-empty) {
    const init_path = $vendor_autoload | path join mise.nu
    ^mise activate nu | save $init_path --force
}

@jdx

jdx commented Aug 11, 2025

Copy link
Copy Markdown
Owner

thanks @atty303

@jdx jdx merged commit 51af3e8 into jdx:main Aug 11, 2025
19 checks passed
Comment thread docs/installing-mise.md
^mise activate nu | save $mise_path --force
' | save $nu.env-path --append
"\nuse ($nu.default-config-dir | path join mise.nu)" | save $nu.config-path --append
'^mise activate nu | save --force ($nu.data-dir | path join vendor autoload mise.nu)' | save $nu.config-path --append

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@jdx note that this fails if .local/share/nushell/vendor/autoload doesn't already exist (it probably doesn't by default; it wasn't created automatically for me).

Suggested change
'^mise activate nu | save --force ($nu.data-dir | path join vendor autoload mise.nu)' | save $nu.config-path --append
mkdir ($nu.data-dir | path join vendor autoload mise.nu)
'^mise activate nu | save --force ($nu.data-dir | path join vendor autoload mise.nu)' | save $nu.config-path --append

@samuelallan72

samuelallan72 commented Aug 12, 2025

Copy link
Copy Markdown

@jdx @Joniator I tested this way according to the new instructions, but it doesn't work. The generated mise.nu exports a main function - this is designed to work with the use mise.nu format. Putting the mise.nu file in the autoload directory does indeed autoload the file, but the main function is registered in nushell as literally main instead of mise.

If we want to switch to this autoload method, we'll also need to make some changes to what is output by mise activate nu.

#3592 should have fixed the path issues, but the problem described in #3555 was not fixed.

Could you comment on the related discussion with what wasn't working for you and how to reproduce it? The PR I submitted fixed the issue for me, and I haven't had trouble with use mise.nu since.

EDIT: please see following conversation at #3555 (reply in thread) . I don't think we want to switch to an autoload script; it can remain as a module, keeping the previous nushell installation instructions (ie. this PR probably should be reverted). I'll look into a fix for the prepend path issue. :)

jdx added a commit that referenced this pull request Aug 12, 2025
jdx added a commit that referenced this pull request Aug 12, 2025
Reverts #5981

reverted until we can sort out the best way to handle this
jdx pushed a commit that referenced this pull request Aug 13, 2025
### 📦 Registry

- add vfox-yarn as primary yarn backend by
[@jdx](https://github.com/jdx) in
[#5982](#5982)
- add missing description field for a lot of tools by
[@jylenhof](https://github.com/jylenhof) in
[#5966](#5966)
- rename benthos to redpanda-connect by
[@risu729](https://github.com/risu729) in
[#5984](#5984)
- rename coq to rocq by [@risu729](https://github.com/risu729) in
[#5985](#5985)

### 🚀 Features

- **(timeout)** show duration, URL, and config hint on timeouts;
increase fetch timeout default to 10s by [@jdx](https://github.com/jdx)
in [#5991](#5991)

### 🐛 Bug Fixes

- **(aqua)** add executable permissions for zip-extracted binaries by
[@itochan](https://github.com/itochan) in
[#5998](#5998)
- **(core)** auto-repair corrupted pyenv cache by recloning on update
failure by [@jdx](https://github.com/jdx) in
[#6003](#6003)
- duplicate versions and validation in `mise tool` by
[@jdx](https://github.com/jdx) in
[#6001](#6001)

### 📚 Documentation

- **(tools)** document per-tool postinstall option in [tools] by
[@jdx](https://github.com/jdx) in
[#5993](#5993)
- Update install instructions for nushell by
[@Joniator](https://github.com/Joniator) in
[#5981](#5981)
- README.md typo by [@jdx](https://github.com/jdx) in
[#5990](#5990)

### ◀️ Revert

- Revert "docs: Update install instructions for nushell" by
[@jdx](https://github.com/jdx) in
[#5983](#5983)
- Revert "fix(aqua): add executable permissions for zip-extracted
binaries" by [@jdx](https://github.com/jdx) in
[#6004](#6004)

### 📦️ Dependency Updates

- update taiki-e/install-action digest to 2c73a74 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5962](#5962)
- update docker/metadata-action digest to c1e5197 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5961](#5961)
- update docker/login-action digest to 184bdaa by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5958](#5958)

### Chore

- cargo up by [@jdx](https://github.com/jdx) in
[#5992](#5992)

### New Contributors

- @Joniator made their first contribution in
[#5981](#5981)
- @jylenhof made their first contribution in
[#5966](#5966)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants