diff --git a/getting-started.md b/getting-started.md index 1c594fd..36b3bff 100644 --- a/getting-started.md +++ b/getting-started.md @@ -326,24 +326,26 @@ See [`MISE_FISH_AUTO_ACTIVATE=1`](/configuration#mise_fish_auto_activate1) for m #### Nushell -Since Nu does [not support `eval`](https://www.nushell.sh/book/how_nushell_code_gets_run.html#eval-function) you must save the activation script: +Since Nu does [not support `eval`](https://www.nushell.sh/book/how_nushell_code_gets_run.html#eval-function) the initialization script is saved in `env.nu`: ```nushell +' let mise_path = $nu.default-config-dir | path join scripts mise.nu -^mise activate nu | save $mise_path --force -"\nuse mise.nu" | save $nu.config-path --append +if $nu.is-interactive { + ^mise activate nu | save $mise_path --force +}' | save $nu.env-path --append +' +if $nu.is-interactive { + use mise.nu +}' | save $nu.config-path --append ``` -If you prefer to keep your dotfiles clean you can save it to another directory then update `$env.NU_LIB_DIRS`: +If you prefer to keep your dotfiles clean you can save it to a different directory then update `$env.NU_LIB_DIRS`: ```nushell -"\n$env.NU_LIB_DIRS ++= ($mise_path | path dirname | to nuon)" | save $nu.env-path --append -``` - -You can update the generated script at any time by re-running: - -```nushell -^mise activate nu | save $mise_path --force +' +$env.NU_LIB_DIRS ++= ($mise_path | path dirname | to nuon) +' | save $nu.env-path --append ``` #### Xonsh