Skip to content

Commit

Permalink
Updated the oh-my-posh setup guide (nushell#990)
Browse files Browse the repository at this point in the history
* Updated the oh-my-posh setup guide

* fixed typo
  • Loading branch information
mike-ninja committed Jul 27, 2023
1 parent 46e7d7a commit be89212
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions book/3rdpartyprompts.md
Expand Up @@ -18,10 +18,15 @@ If you like [oh-my-posh](https://ohmyposh.dev/), you can use oh-my-posh with Nus

1. Install Oh My Posh and download oh-my-posh's themes following [guide](https://ohmyposh.dev/docs/installation/linux).
2. Download and install a [nerd font](https://github.com/ryanoasis/nerd-fonts).
3. Set the PROMPT_COMMAND in ~/.config/nushell/config.nu(or the path output by `$nu.config-path`), change `M365Princess.omp.json` to whatever you like [Themes demo](https://ohmyposh.dev/docs/themes).
3. Generate the .oh-my-posh.nu file. By default it will be generated to your home directory. You can use `--config` to specify a theme, other wise, oh-my-posh comes with a default theme.
4. Initialize oh-my-posh prompt by adding in ~/.config/nushell/config.nu(or the path output by `$nu.config-path`) to source ~/.oh-my-posh.nu.

```shell
> $env.PROMPT_COMMAND = { oh-my-posh --config ~/.poshthemes/M365Princess.omp.json }
# Generate the .oh-my-posh.nu file
> oh-my-posh init nu --config ~/.poshthemes/M365Princess.omp.json

# Initialize oh-my-posh.nu at shell startup by adding this line in your config.nu file
> source ~/.oh-my-posh.nu
```

For MacOS users:
Expand Down

0 comments on commit be89212

Please sign in to comment.