docs(nu): correct customization info

resolves #2293
This commit is contained in:
Jan De Dobbeleer 2022-05-20 09:12:21 +02:00 committed by Jan De Dobbeleer
parent f84dac27e2
commit 6612780fd0

View file

@ -92,23 +92,22 @@ Once altered, reload your config for the changes to take effect.
</TabItem>
<TabItem value="nu">
**Nu < 0.32.0**
:::warning
Oh My Posh requires Nushell >= 0.60.0
:::
Edit `$nu.configuration/path` and add the following lines at the bottom.
```bash
config set prompt "= `{{$(oh-my-posh print primary --config ~/.jandedobbeleer.omp.json | str collect)}}`"
oh-my-posh init nu --config ~/.jandedobbeleer.omp.json
source ~/.oh-my-posh.nu
```
**Nu >= 0.32.0**
If you want to save the initialization script elsewhere, replace the lines above with these:
```bash
config set prompt "(oh-my-posh print primary --config ~/.jandedobbeleer.omp.json | str collect)"
```
**Nu >= 0.60.0**
```bash
let-env PROMPT_COMMAND = { oh-my-posh print primary --config ~/.jandedobbeleer.omp.json }
let-env PROMPT_COMMAND_RIGHT = { oh-my-posh print right --config ~/.jandedobbeleer.omp.json }
oh-my-posh init nu --config ~/.jandedobbeleer.omp.json --print | save /mylocation/myscript.nu
source /mylocation/myscript.nu
```
Once altered, restart nu shell for the changes to take effect.