docs: Update install instructions for nushell#5981
Conversation
There was a problem hiding this comment.
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
usecommand approach that was causing path-related problems
|
bugbot run |
|
@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 |
|
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
} |
|
thanks @atty303 |
| ^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 |
There was a problem hiding this comment.
@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).
| '^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 |
|
@jdx @Joniator I tested this way according to the new instructions, but it doesn't work. The generated mise.nu exports a If we want to switch to this autoload method, we'll also need to make some changes to what is output by
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 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. :) |
Reverts #5981 reverted until we can sort out the best way to handle this
### 📦 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)
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