Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Update Nushell integration
Browse files Browse the repository at this point in the history
Depends on jdx/mise#1763 in release.
  • Loading branch information
texastoland committed Mar 16, 2024
1 parent 4ce8ab4 commit a63d3b9
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,24 @@ 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:

```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 you prefer to keep your dotfiles clean you can save it to another 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
do {
let misepath = ($nu.config-path | path dirname | path join "mise.nu")
run-external mise activate nu --redirect-stdout | save $misepath -f
$"\nsource "($misepath)"" | save $nu.config-path --append
}
^mise activate nu | save $mise_path --force
```

#### Xonsh
Expand Down

0 comments on commit a63d3b9

Please sign in to comment.