diff --git a/README.md b/README.md index 87ee8a7c1..e9f19fcdd 100644 --- a/README.md +++ b/README.md @@ -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 +starship init nu | save $starship_path --force +' | 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 ``` diff --git a/docs/README.md b/docs/README.md index 8d0079090..3f7241534 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 + starship init nu | save $starship_path --force + ' | 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