1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2025-01-15 11:17:00 +00:00

docs(nu): simplify nushell setup (#6445)

This commit is contained in:
David Knaack 2025-01-11 14:58:45 +01:00 committed by GitHub
parent dfddd999c3
commit ee6bf760d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 26 deletions

View File

@ -339,20 +339,14 @@ 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):
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
```
Note: Only Nushell v0.78+ is supported
Note: Only Nushell v0.96+ is supported
</details>

View File

@ -154,21 +154,15 @@ onMounted(() => {
::: warning
This will change in the future.
Only Nushell v0.78+ is supported.
Only Nushell v0.96+ is supported.
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
Add the following to the end of your Nushell configuration (find it by running `$nu.config-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`):
```sh
use ~/.cache/starship/init.nu
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
#### Xonsh

View File

@ -351,13 +351,10 @@ print_install() {
nushell )
# shellcheck disable=SC2088
config_file="${BOLD}your nu config file${NO_COLOR} (find it by running ${BOLD}\$nu.config-path${NO_COLOR} in Nushell)"
config_cmd="use ~/.cache/starship/init.nu"
config_cmd="mkdir (\$nu.data-dir | path join \"vendor/autoload\")
starship init nu | save -f (\$nu.data-dir | path join \"vendor/autoload/starship.nu\")"
warning="${warning} This will change in the future.
Only Nushell v0.78 or higher is supported.
Add the following to the end of ${BOLD}your Nushell env file${NO_COLOR} (find it by running ${BOLD}\$nu.env-path${NO_COLOR} in Nushell):
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu"
Only Nushell v0.96 or higher is supported."
;;
esac
printf " %s\n %s\n And add the following to the end of %s:\n\n\t%s\n\n" \