Console

OMZSH – Oh, my ZSH

Get the best of the zsh

Apple switched to zsh as of Catalina. They hasn’t explained exactly why making this change, but considering the fact that bash is relatively old, that seems to be good choice.

Probably Ubuntu and other Linux distribution will follow that as well.

Fact is – zsh could turn your every day console live.

You are Mac User fan or Linux guru? Does not matter – if you like ZSH, you must definitely start using Oh my ZSH right away.

I often switch to different servers and shells and really hate that old fasion console. So I decided to put together everything needed to make the zsh shell more friendly.

That is the reason I’ve created that guide with plugins I’m using.

oh-my-zsh Installation

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

That’s easy – right? Now its time to put some powerful tools in place. One of the best is of course – themes. There are tens of those, but my favorite is Powerlevel10k.

To install it:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc

Now – restart your shell. You will see the installation screen for Powerlevel10k, follow it and set your preferences.

Thats it – you just had your Powerlevel10k configured for your specific needs.

Lets jump to next powerful thing – plugins that you may find very useful.

ZSH and oh-my-shell plugins

Autocomplete

https://github.com/marlonrichert/zsh-autocomplete

git clone https://github.com/marlonrichert/zsh-autocomplete.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autocomplete
  1. Add zsh-autocomplete to your plugin list – edit ~./zshrc and change plugins=(...) to plugins=(... auto-autocomplete)

Autosuggestions

https://github.com/zsh-users/zsh-autosuggestions/

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. Add zsh-autosuggestions to your plugin list – edit ~./zshrc and change plugins=(...) to plugins=(... auto-autosuggestions)

Notifications from the terminal

Auto notify

https://github.com/MichaelAquilina/zsh-auto-notify

git clone https://github.com/MichaelAquilina/zsh-auto-notify.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/auto-notify
  1. Add zsh-notify to your plugin list – edit ~./zshrc and change plugins=(...) to plugins=(... auto-notify)

ZSH notify

Mac install terminal notifier

https://github.com/julienXX/terminal-notifier

brew install terminal-notifier

The you are ready to install zsh-notify

https://github.com/marzocchi/zsh-notify

git clone [email protected]:marzocchi/zsh-notify.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/notify
  1. Add zsh-notify to your plugin list – edit ~./zshrc and change plugins=(...) to plugins=(... notify)

Syntax highlighting

https://github.com/zdharma/fast-syntax-highlighting

git clone https://github.com/zdharma/fast-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
  1. Add fast-syntax-highlighting to your plugin list – edit ~./zshrc and change plugins=(...) to plugins=(... fast-syntax-highlighting)

All in one command

If you don’t want to go through all the troubles above – there is on line command I’ve created:

sh -c "$(wget -O- https://raw.githubusercontent.com/sdobreff/oh-my-zsh-plugins/main/oh-my-zsh-plugins-install.sh)"

during the installation, new zsh session will be created – exit from it with the ctrl-d (do not close the window), and the installation script will continue.

Next step – find plugins section in your .zshrc file in home directory and add the following:


plugins=(
auto-notify
git
zsh-autosuggestions
fast-syntax-highlighting
)

Start new zsh session – set you preferences and you are all set – enjoy your new console!

See also:
Vagrant image for PHP development
Single Vagrant for multiple projects

Tags

Related Articles

Close
Close