termoji zsh theme
termoji is a ZSH theme based on Tyler Reckart's HYPERZSH. It introduces emojis to check a git repository status at a glance. This theme divides the prompt in two lines, displaying the directory and repository info in the first one and allocating more room to type the command at the second. You can customize it by simply editing a file.
I will explain how to get a macOS terminal working as mine (see sample GIF).
- macOS 10.14 Mojave (needed for iTerm2's seamless title bar)
- iTerm2 3.2-20180812-nightly or later (otherwise, you will need a hack to get the seamless title bar)
- ZSH or https://brew.sh to install it
- Download iTerm2 3.2-20180812-nightly or later.
- Open iTerm2 and go to Preferences (
- In Appearance set the Theme to
Minimal, uncheck Show window number in title bar and check Hide scrollbars.
- Move to the section Profiles.
- In the Window tab, select Style:
- Set a fancy font like Source Code Pro in Text.
- Download this color scheme and import it in the Colors tab (Color Presets...).
Open a new terminal window and you will see your seamless terminal.
Check out this hack if you want to achieve a similar result on an OS prior to Mojave.
Unless you are not using macOS or you removed it manually, ZSH is already installed in your system out of the box. Run
zsh --version to make sure. If it is not installed for any reason, install it by running
brew install zsh zsh-completions.
Oh My ZSH is a piece of software that will make shell customization more handy by including tons of plugins. Install it by downloading its installation script with
curl. I'm not responsible for that script, so you would do well by reviewing it before.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Then clone this repository to the custom themes' directory:
git clone https://github.com/odelrio/termoji-zsh-theme ~/.oh-my-zsh/custom/themes/termoji-zsh-theme
~/.zshrc with your favorite text editor and replace your current theme with
Save the file, restart your shell and enjoy your cool terminal.
~/.zshrc with a text editor and go to the bottom of the file. There you can set your own aliases and commands to be run along every shell session. Let's create an alias to take us to this configuration file faster. Prepend the following line and replace
vi with your favorite text editor.
# zshconfig alias zshconfig='vi ~/.zshrc'
You can get command suggestion as you type based on your previous executions. To achieve that, enable the plugin
zsh-autosuggestions by editing
zshconfig). Find that
plugins=(git) line (or such, since I assume
git is the only plugin out of the box) and add
zsh-autosuggestions (use a space or a line break to separate plugins).
Shortcut to your recent directories (
As you could see in the sample GIF above, you can use the command
z (a Oh My ZSH plugin) to go straight to a recent directory by writing part of its name.
z will remember the directories you visit by writing the whole path or
cding into them.
Edit your ZSH config file again to include the plugin
z (separate each plugin with a space or line break). It may look somewhat like:
plugins=( git zsh-autosuggestions z )