docs: consistent installation guide

closes #785
This commit is contained in:
Jan De Dobbeleer 2021-06-08 07:37:34 +02:00 committed by Jan De Dobbeleer
parent 24f87f8557
commit db9c06bf07
4 changed files with 34 additions and 8 deletions

View file

@ -40,6 +40,9 @@ for file in ~/.poshthemes/*.omp.json; do echo "$file\n"; oh-my-posh --config $fi
### Replace your existing prompt
The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.
When you've downloaded the themes, you can find this one at `~/.poshthemes/jandedobbeleer.omp.json`.
<Shells />
### Customize

View file

@ -46,6 +46,9 @@ brew upgrade oh-my-posh
### Replace your existing prompt
The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.
When using brew, you can find this one at `$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json`.
<Shells />
### Customize

View file

@ -26,7 +26,7 @@ oh-my-posh --print-shell
Edit `$PROFILE` in your preferred PowerShell version and add the following line.
```powershell
oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json | Invoke-Expression
oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
```
Once added, reload your profile for the changes to take effect.
@ -41,7 +41,7 @@ Once added, reload your profile for the changes to take effect.
Add the following to `~/.zshrc`:
```bash
eval "$(oh-my-posh --init --shell zsh --config ~/.mytheme.omp.json)"
eval "$(oh-my-posh --init --shell zsh --config ~/jandedobbeleer.omp.json)"
```
Once added, reload your profile for the changes to take effect.
@ -56,7 +56,7 @@ source ~/.zshrc
Add the following to `~/.bashrc` (or `~/.profile` on MacOS):
```bash
eval "$(oh-my-posh --init --shell bash --config ~/.mytheme.omp.json)"
eval "$(oh-my-posh --init --shell bash --config ~/jandedobbeleer.omp.json)"
```
Once added, reload your profile for the changes to take effect.
@ -81,7 +81,7 @@ It's advised to be on the latest version of fish. Versions below 3.1.2 have issu
Initialize Oh My Posh in `~/.config/fish/config.fish`:
```bash
oh-my-posh --init --shell fish --config ~/.poshthemes/jandedobbeleer.omp.json | source
oh-my-posh --init --shell fish --config ~/jandedobbeleer.omp.json | source
```
Once added, reload your config for the changes to take effect.
@ -98,13 +98,13 @@ Set the prompt and restart nu shell:
### Nu < 0.32.0
```bash
config set prompt "= `{{$(oh-my-posh --config ~/.poshthemes/jandedobbeleer.omp.json | str collect)}}`"
config set prompt "= `{{$(oh-my-posh --config ~/jandedobbeleer.omp.json | str collect)}}`"
```
### Nu >= 0.32.0
```bash
config set prompt "(oh-my-posh --config ~/.poshthemes/jandedobbeleer.omp.json | str collect)"
config set prompt "(oh-my-posh --config ~/jandedobbeleer.omp.json | str collect)"
```
Restart nu shell for the changes to take effect.

View file

@ -156,8 +156,28 @@ when setting the prompt using the `--config` flag.
</TabItem>
</Tabs>
The guides below use an imaginary theme called `mytheme.omp.json`, so make sure to replace that with your own, or one of the
included themes.
The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.
Based on the installation method used, you can find this theme at the following location:
<Tabs
defaultValue="winget"
groupId="install"
values={[
{ label: 'winget', value: 'winget', },
{ label: 'scoop', value: 'scoop', },
]
}>
<TabItem value="winget">
`~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json`
</TabItem>
<TabItem value="scoop">
`"$(scoop prefix oh-my-posh)\themes\jandedobbeleer.omp.json"`
</TabItem>
</Tabs>
<Shells />