Skip to content

Commit

Permalink
Simplify Nushell integration
Browse files Browse the repository at this point in the history
Motivated by jdx/mise-docs#46 for consistency between tools.
  • Loading branch information
texastoland committed Mar 16, 2024
1 parent 698572a commit d7e95cd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,24 +137,24 @@ description: Starship is the minimal, blazing fast, and extremely customizable p

#### Nushell

::: warning

This will change in the future.
Only Nushell v0.78+ is supported.
Since Nu does [not support `eval`](https://www.nushell.sh/book/how_nushell_code_gets_run.html#eval-function) you must save the initialization script:

:::
```nushell
let starship_path = $nu.default-config-dir | path join scripts starship.nu
starship init nu | save $starship_path --force
"\nuse starship.nu" | save $nu.config-path --append
```

Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
If you prefer to keep your dotfiles clean you can save it to another directory then update `$env.NU_LIB_DIRS`:

```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```nushell
"\n$env.NU_LIB_DIRS ++= ($starship_path | path dirname | to nuon)" | save $nu.env-path --append
```

And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
You can update the generated script at any time by re-running:

```sh
use ~/.cache/starship/init.nu
```nushell
starship init nu | save $starship_path --force
```

#### Xonsh
Expand Down

0 comments on commit d7e95cd

Please sign in to comment.