Make your terminal stylish, functional, and fast.
None of that bloated nonsense.
Made to replace oh-my-posh because it was too slow and complicated.
oh-my-go is a shell engine that is designed to be fast and opinionated.
It is not customizable (unless you know go), which allows it to be faster than other shell engines.
It supports a wide variety of shells.
Additionally, oh-my-go changes your PS1 and that's it. No confusing aliases, no unexplained flags, nothing.
It supports one singular theme: robbyrussels, because it's functional and pretty.
First, download a suitable binary from the releases, or clone the repository and compile it yourself by running make
.
Then, move the binary into PATH.
sudo mkdir -p /usr/local/bin
sudo mv oh-my-go* /usr/local/bin/oh-my-go
sudo chmod +x /usr/local/bin/oh-my-go
Warning You may see an error that oh-my-go wasn't found, if you see this you may not have
~/.local/bin/
in your PATH.Here there are instructions on how to add it from another one of my projects.
mkdir -p ~/.local/bin
mv oh-my-go* ~/.local/bin/oh-my-go
chmod +x ~/.local/bin/oh-my-go
To install oh-my-go on windows, move the oh-my-go binary to a place
where it will not be deleted and rename it to oh-my-go
.
Keep and mind if you don't have oh-my-go
in your path you can replace it with the location.
So for zsh, instead of:
echo 'set -o PROMPT_SUBST' >> .zshrc
echo 'PS1='"'\$( oh-my-go prompt --shell=zsh --pwd=\$PWD --user=\$USER --exitcode=\$? --hostname=\$HOST )'" >> ~/.zshrc
you could do:
echo 'set -o PROMPT_SUBST' >> .zshrc
echo 'PS1='"'\$( /path/to/oh-my-go prompt --shell=zsh --pwd=\$PWD --user=\$USER --exitcode=\$? --hostname=\$HOST )'" >> ~/.zshrc
echo 'set -o PROMPT_SUBST' >> .zshrc
echo 'PS1='"'\$( oh-my-go prompt --shell=zsh --pwd=\$PWD --user=\$USER --exitcode=\$? --hostname=\$HOST )'" >> ~/.zshrc
echo 'PS1='"'\$( oh-my-go prompt --shell=bash --pwd=\$PWD --user=\$USER --exitcode=\$? --hostname=\$HOSTNAME )'" >> ~/.bashrc
mkdir -p ~/.config/fish/
echo >> ~/.config/fish/config.fish 'if status is-interactive
function fish_prompt
printf (oh-my-go prompt --shell=fish --pwd=\$PWD --user=\$USER --exitcode=\$status --hostname=(prompt_hostname))
end
end
'
You need to add:
function prompt {
"$(\Location\To\oh-my-go prompt --shell=powershell --pwd=$PWD --user=$UserName --exitcode=$LASTEXITCODE --hostname=$COMPUTERNAME)"
}
to your $PROFILE
.
I didn't create a specific command because powershell is garbage.
You should add:
PS1='$( oh-my-go prompt --shell=sh --pwd=$PWD --user=$USER --exitcode=$? --hostname=$HOSTNAME )'
to your shell's rc/profile file.
Please open an issue and I might add instructions/support for that shell.
Nope. You're on your own.
You can use specific plugins by setting OMGO_PLUGINS
to a string which has all your plugins
seperated by spaces. Like so on bash:
export OMGO_PLUGINS="git node python"
git
python
ruby
node
rust
If you use a lot of different devices, you can set OMGO_SHOW_USER_HOSTNAME=1
which will add an extra bit
at the beginning of your prompt which displays your username and hostname.
Example on bash:
export OMGO_SHOW_USER_HOSTNAME=1
Note This is an "unofficial" modification to the theme which was not explicitly defined by robbyrussell himself.
If you're even slightly familiar with golang, this shouldn't be too bad.
You need to edit internal/prompt/prompt.go
and from there you can make small adjustments like change
some characters or add a newline and so on so fourth.
Then, recompile & install oh-my-go.