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

Commit

Permalink
Fix hidden command in Nushell (#48)
Browse files Browse the repository at this point in the history
The coditional check ran the mise hook but hid its exported command. It
was intended to prevent mise from running in scripts. In practice those
configs are skipped by default in scripts anyway.
  • Loading branch information
texastoland authored Mar 23, 2024
1 parent 7ee686f commit 5c57db1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,15 @@ Since Nu does [not support `eval`](https://www.nushell.sh/book/how_nushell_code_
```nushell
'
let mise_path = $nu.default-config-dir | path join scripts mise.nu
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
^mise activate nu | save $mise_path --force
' | save $nu.env-path --append
"\nuse mise.nu" | save $nu.config-path --append
```

If you prefer to keep your dotfiles clean you can save it to a different directory then update `$env.NU_LIB_DIRS`:

```nushell
'
$env.NU_LIB_DIRS ++= ($mise_path | path dirname | to nuon)
' | save $nu.env-path --append
"\n$env.NU_LIB_DIRS ++= ($mise_path | path dirname | to nuon)" | save $nu.env-path --append
```

#### Xonsh
Expand Down

0 comments on commit 5c57db1

Please sign in to comment.