mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
docs(linux): install via brew
This commit is contained in:
parent
e8a4fa19b7
commit
8e82d2b80c
35
docs/docs/install-homebrew.mdx
Normal file
35
docs/docs/install-homebrew.mdx
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
A [Homebrew][brew] formula is available for easy installation.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew tap jandedobbeleer/oh-my-posh
|
||||||
|
brew install oh-my-posh
|
||||||
|
```
|
||||||
|
|
||||||
|
This installs two things:
|
||||||
|
|
||||||
|
- `oh-my-posh` - Executable, added to `/usr/local/bin`
|
||||||
|
- `themes` - The latest Oh My Posh themes
|
||||||
|
|
||||||
|
If you want to use a standard theme, you can find them in `$(brew --prefix oh-my-posh)/themes`, referencing them as such
|
||||||
|
will always keep them compatible with the binary when updating Oh My Posh.
|
||||||
|
|
||||||
|
#### Preview the themes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for file in $(brew --prefix oh-my-posh)/themes/*.omp.json; do echo "$file\n"; oh-my-posh --config $file --shell universal; echo "\n"; done;
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Update
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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`.
|
||||||
|
|
||||||
|
[brew]: https://brew.sh
|
|
@ -9,39 +9,14 @@ import TabItem from "@theme/TabItem";
|
||||||
import Shells from "./install-shells.mdx";
|
import Shells from "./install-shells.mdx";
|
||||||
import Customize from "./install-customize.md";
|
import Customize from "./install-customize.md";
|
||||||
import CustomizeCmd from "./install-customize-cmd.mdx";
|
import CustomizeCmd from "./install-customize-cmd.mdx";
|
||||||
|
import InstallHomebrew from "./install-homebrew.mdx";
|
||||||
|
|
||||||
### Setup your terminal
|
### Setup your terminal
|
||||||
|
|
||||||
Oh My Posh uses ANSI color codes under the hood, these should work in every terminal,
|
Oh My Posh uses ANSI color codes under the hood, these should work in every terminal,
|
||||||
but you may have to set the environment variable `$TERM` to `xterm-256color` for it to work.
|
but you may have to set the environment variable `$TERM` to `xterm-256color` for it to work.
|
||||||
|
|
||||||
### Installation
|
<InstallHomebrew />
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
|
|
||||||
sudo chmod +x /usr/local/bin/oh-my-posh
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Download the themes
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir ~/.poshthemes
|
|
||||||
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip
|
|
||||||
unzip ~/.poshthemes/themes.zip -d ~/.poshthemes
|
|
||||||
chmod u+rw ~/.poshthemes/*.json
|
|
||||||
rm ~/.poshthemes/themes.zip
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Preview the themes
|
|
||||||
|
|
||||||
```bash
|
|
||||||
for file in ~/.poshthemes/*.omp.json; do echo "$file\n"; oh-my-posh --config $file --shell universal; echo "\n"; done;
|
|
||||||
```
|
|
||||||
|
|
||||||
### 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 />
|
<Shells />
|
||||||
|
|
||||||
|
@ -57,5 +32,4 @@ When you've downloaded the themes, you can find this one at `~/.poshthemes/jande
|
||||||
[wt]: https://github.com/microsoft/terminal
|
[wt]: https://github.com/microsoft/terminal
|
||||||
[iterm2]: https://www.iterm2.com/
|
[iterm2]: https://www.iterm2.com/
|
||||||
[powershell]: https://www.powershellgallery.com/packages/oh-my-posh
|
[powershell]: https://www.powershellgallery.com/packages/oh-my-posh
|
||||||
[brew]: https://brew.sh
|
|
||||||
[configuration]: /docs/config-overview
|
[configuration]: /docs/config-overview
|
||||||
|
|
|
@ -15,39 +15,7 @@ import CustomizeCmd from "./install-customize-cmd.mdx";
|
||||||
As the standard terminal has issues displaying the ANSI characters correctly, we advise using
|
As the standard terminal has issues displaying the ANSI characters correctly, we advise using
|
||||||
[iTerm2][iterm2] or any other modern day MacOS terminal that supports ANSI characters.
|
[iTerm2][iterm2] or any other modern day MacOS terminal that supports ANSI characters.
|
||||||
|
|
||||||
### Installation
|
<InstallHomebrew />
|
||||||
|
|
||||||
A [Homebrew][brew] formula is available for easy installation.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
brew tap jandedobbeleer/oh-my-posh
|
|
||||||
brew install oh-my-posh
|
|
||||||
```
|
|
||||||
|
|
||||||
This installs two things:
|
|
||||||
|
|
||||||
- `oh-my-posh` - Executable, added to `/usr/local/bin`
|
|
||||||
- `themes` - The latest Oh My Posh themes
|
|
||||||
|
|
||||||
If you want to use a standard theme, you can find them in `$(brew --prefix oh-my-posh)/themes`, referencing them as such
|
|
||||||
will always keep them compatible with the binary when updating Oh My Posh.
|
|
||||||
|
|
||||||
#### Preview the themes
|
|
||||||
|
|
||||||
```bash
|
|
||||||
for file in $(brew --prefix oh-my-posh)/themes/*.omp.json; do echo "$file\n"; oh-my-posh --config $file --shell universal; echo "\n"; done;
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Update
|
|
||||||
|
|
||||||
```bash
|
|
||||||
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 />
|
<Shells />
|
||||||
|
|
||||||
|
@ -63,5 +31,4 @@ When using brew, you can find this one at `$(brew --prefix oh-my-posh)/themes/ja
|
||||||
[wt]: https://github.com/microsoft/terminal
|
[wt]: https://github.com/microsoft/terminal
|
||||||
[iterm2]: https://www.iterm2.com/
|
[iterm2]: https://www.iterm2.com/
|
||||||
[powershell]: https://www.powershellgallery.com/packages/oh-my-posh
|
[powershell]: https://www.powershellgallery.com/packages/oh-my-posh
|
||||||
[brew]: https://brew.sh
|
|
||||||
[configuration]: /docs/config-overview
|
[configuration]: /docs/config-overview
|
||||||
|
|
Loading…
Reference in a new issue