Skip to content

Commit

Permalink
fix(nu): use the most recent starship init (starship#3908)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna authored May 4, 2022
1 parent 393d62c commit 382445d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ eval $(starship init ion)
<details>
<summary>Nushell</summary>

Run the following:
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):

```sh
mkdir ~/.cache/starship
Expand All @@ -337,11 +337,10 @@ starship init nu | save ~/.cache/starship/init.nu
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):

```sh
starship init nu | save ~/.cache/starship/init.nu
source ~/.cache/starship/init.nu
```

Note: Only Nushell v0.60+ is supported
Note: Only Nushell v0.61+ is supported

</details>

Expand Down
10 changes: 4 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
::: warning

This will change in the future.
Only Nushell v0.60+ is supported.

Only Nushell v0.61+ is supported.
:::

Run the following:
Add the following to 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 ~/.cache/starship/init.nu
Expand All @@ -152,8 +152,6 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):

```sh
mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu
source ~/.cache/starship/init.nu
```
#### Xonsh
Expand Down
11 changes: 5 additions & 6 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,19 @@ print_install() {
;;
nushell )
# shellcheck disable=SC2088
config_file="your nu config file"
config_file="${BOLD}your nu config file${NO_COLOR} (find it by running ${BOLD}\$nu.config-path${NO_COLOR} in Nushell)"
config_cmd="mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu
source ~/.cache/starship/init.nu"
warning="${warning} This will change in the future.
Only Nushell v0.60 or higher is supported.
You can check the location of this your config file by running \$nu.config-path in nu.
${BOLD}First run${NO_COLOR} \"mkdir ~/.cache/starship; starship init nu | save ~/.cache/starship/init.nu\""
Only Nushell v0.61 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 ~/.cache/starship/init.nu\""
;;
esac
printf " %s\n %s\n Add the following to the end of %s:\n\n\t%s\n\n" \
printf " %s\n %s\n And add the following to the end of %s:\n\n\t%s\n\n" \
"${BOLD}${UNDERLINE}${s}${NO_COLOR}" \
"${warning}" \
"${BOLD}${config_file}${NO_COLOR}" \
"${config_file}" \
"${config_cmd}"
done

Expand Down

0 comments on commit 382445d

Please sign in to comment.