Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(nu): Simplify Nushell integration instructions #5845

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,21 +339,22 @@ eval $(starship init ion)
<details>
<summary>Nushell</summary>

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
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 starship_path = $nu.default-config-dir | path join scripts starship.nu
starship init nu | save $starship_path --force
' | save $nu.env-path --append
"\nuse starship.nu" | save $nu.config-path --append
```

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 a different directory then update `$env.NU_LIB_DIRS`:

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

Note: Only Nushell v0.78+ is supported

</details>

<details>
Expand Down
26 changes: 11 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,24 +137,20 @@ 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.

:::

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
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 starship_path = $nu.default-config-dir | path join scripts starship.nu
starship init nu | save $starship_path --force
' | save $nu.env-path --append
"\nuse starship.nu" | save $nu.config-path --append
```

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 a different directory then update `$env.NU_LIB_DIRS`:

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

#### Xonsh
Expand Down