Increasing the Shell functions with OhMyZsh and OhMyBash
What are OhMyZsh and OhMyBash
Oh my Zsh and Oh My Bash are frameworks which add new functionalities modifiying the environment to improve the user experience.
Installing
They can be installed from the command line:
1 | bash -c "$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)" |
1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
❗ Be careful: it replaces the configuration file with a new one, creating a backup adding the date to its name. If profile does not exist, it creates a new one with the default configuration.
bash: configuration is on
~/.bashrc
, profile is on :~/.bash_profile
.zsh: configuration is on
~/.zshrc
, rofile is on :~/.zsh_profile
Automatic update can be update on the configuration file, changing its value to
true
orfalse
:1
DISABLE_UPDATE_PROMPT=true
Manual update:
1
upgrade_oh_my_bash
Uninstalling
Remove and restore the previous .bashrc configuration.
1 | uninstall_oh_my_bash |
Themes
You can check the on the OhMyZhs wiki or OhMyBash wiki. You can change it on the .bashrc
file, or even choose “random”.
1 | OSH_THEME="powerline-icon" |
Plugins
Small programs that add new functions. Edit the .bashrc
file on the plugins
section:
1 | plugins=( |
Autocomplete
Shows command options, example: write git
and press tab
willñ show different available options for that command, writing the first common letters available for the option you started typing.
Aliases
An alias is a custom command which executes a longer terminal command that can be set on the configuration file.
1 | alias weather="curl wttr.in" |
The framworks also provide some useful aliases packages:
1 | aliases=( |
Example: general brings typing C
and pressing enter
to clean the terminal.