Implement Nu contributor feedback

This commit is contained in:
Texas Toland 2024-03-23 09:30:41 -05:00
parent d7826592eb
commit 1d2f4d8c02
2 changed files with 8 additions and 20 deletions

View File

@ -344,21 +344,15 @@ Since Nu does [not support `eval`](https://www.nushell.sh/book/how_nushell_code_
```nushell
'
let starship_path = $nu.default-config-dir | path join scripts starship.nu
if $nu.is-interactive {
starship init nu | save $starship_path --force
}' | save $nu.env-path --append
'
if $nu.is-interactive {
use starship.nu
}' | save $nu.config-path --append
' | save $nu.env-path --append
"\nuse starship.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 ++= ($starship_path | path dirname | to nuon)
' | save $nu.env-path --append
"\n$env.NU_LIB_DIRS ++= ($starship_path | path dirname | to nuon)" | save $nu.env-path --append
```
</details>

View File

@ -142,21 +142,15 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```nushell
'
let starship_path = $nu.default-config-dir | path join scripts starship.nu
if $nu.is-interactive {
starship init nu | save $starship_path --force
}' | save $nu.env-path --append
'
if $nu.is-interactive {
use starship.nu
}' | save $nu.config-path --append
' | save $nu.env-path --append
"\nuse starship.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 ++= ($starship_path | path dirname | to nuon)
' | save $nu.env-path --append
"\n$env.NU_LIB_DIRS ++= ($starship_path | path dirname | to nuon)" | save $nu.env-path --append
```
#### Xonsh