mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-28 11:31:04 -08:00
parent
f84dac27e2
commit
6612780fd0
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue