mirror of
https://github.com/starship/starship.git
synced 2024-12-01 04:34:02 +01:00
Simplify Nushell integration
Motivated by jdx/mise-docs#46 for consistency between tools.
This commit is contained in:
parent
698572aa57
commit
d7e95cdb42
@ -137,24 +137,24 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||||||
|
|
||||||
#### Nushell
|
#### Nushell
|
||||||
|
|
||||||
::: warning
|
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:
|
||||||
|
|
||||||
This will change in the future.
|
```nushell
|
||||||
Only Nushell v0.78+ is supported.
|
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):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mkdir ~/.cache/starship
|
|
||||||
starship init nu | save -f ~/.cache/starship/init.nu
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
If you prefer to keep your dotfiles clean you can save it to another directory then update `$env.NU_LIB_DIRS`:
|
||||||
|
|
||||||
```sh
|
```nushell
|
||||||
use ~/.cache/starship/init.nu
|
"\n$env.NU_LIB_DIRS ++= ($starship_path | path dirname | to nuon)" | save $nu.env-path --append
|
||||||
|
```
|
||||||
|
|
||||||
|
You can update the generated script at any time by re-running:
|
||||||
|
|
||||||
|
```nushell
|
||||||
|
starship init nu | save $starship_path --force
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Xonsh
|
#### Xonsh
|
||||||
|
Loading…
Reference in New Issue
Block a user