XtGem Forum catalog
HomeBlogAbout Me

Iterm2 Zsh



  1. Iterm2 Zsh Alias
  2. Iterm2 + Zsh
  3. Iterm2 Zsh Tmux

Add the lines /bin/zsh and /usr/local/bin/zsh after the other shells. Press escape to exit out of insert mode. Once done, save the changes by typing:wq which refers to write and quit. We can now switch to zsh. Type the command chsh -s $(which zsh). The shell is now changed to zsh. Close iTerm2 and open it again. My Terminal Setup: iTerm + Zsh. As a follow up to my post on my text editor setup, I wanted to write about the other key part of my development setup - my terminal. Unlike my relatively new text editor setup, my terminal configuration has followed me around for years - spanning over multiple jobs and even more computers. Use iTerm2, Oh My Zsh, and Powerlevel10k to create a terminal built for productivity. Setup iTerm with Oh-My-Zsh and Plugins 2 minute read As a software engineer, we spend significant amount of time in terminal. Feeder 3 6 4 x 2. Terminal in Mac OSX is better than windows but not as good as iTerm2. If you combine iTerm with Zsh and Oh-My-Zsh then what you get is awesomeness. Install iTerm2; Install Brew; Install and Configure Fira Code Font.

As a follow up to my post on my text editor setup, I wanted to write about the other key part of my development setup -- my terminal. Unlike my relatively new text editor setup, my terminal configuration has followed me around for years -- spanning over multiple jobs and even more computers. It's the first thing I get set up on when I get a new computer

Oh-My-Zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes and a few things that make.

I use iTerm2 for my Terminal emulator. It has some really cool features, like search, autocomplete, and paste history. That being said, the feature that makes it a complete must have for me is the split panes.

When I do web development work, I usually have panes open for my server session and for running other commands as necessary. When running many processes at a time, as was required at my old job, I would easily have 10 panes open at a time

You can use the shortcut cmd + d for a new pane horizontally, and cmd + shift + d for a new vertical pane.

I do have some tweaks to the color palette that I use -- I think the biggest is that my default font is pink (the forefront color).

Iterm2 powerline

Other than that, most of the 'magic' comes from my shell, Zsh!

For my shell, the programming language the command line uses, I use Zsh instead of Bash.

There are some pros and cons of using Zsh, the biggest drawback I've found is some difficulty installing certain software. This was a big learning curve at first, but over time I've gotten used to common stumbling blocks and don't have as many problems. Taking this into account, I would only recommend Zsh for experienced shell users!

That being said, the pros for me far outweigh the cons. The tab completion is much better in Zsh as compared to Bash. It even has tab completion for Git!

Oh My Zsh is a framework for managing your Zsh configuration, and it is a must download. When I refer to Zsh, a lot of the features are actually a part of Oh My Zsh.

My .zshrc

Iterm2 Zsh Alias

Instead of a .bash_profile, Zsh primarily uses a .zshrc file where your customizations are saved. By default, there are a bunch of comments explaining different settings in that file. I am going to go through some of my settings below.

Zsh has awesome themes, which change the appearance of your prompt.

I use Spaceship which displays a bunch of excellent information. For example, in the directory for my blog, which is a node app, my git branch, the git status, the package version, and the current Node version display. Also, it shows the amount of time the previous command took to run and the computer battery percentage if it is low! This changes slightly from directory to directory, but its really nice to have this information so accessible, especially compared to how difficult it can be to create something similar in a Bash environment.

I am always switching on and off the auto-correct built into Zsh. Right now I have it turned on, but it does sometimes annoy me.

Another excellent Zsh feature is plugins. Duke nukem pc. These make Zsh have better autocomplete for different languages or add additional features to the shell. I especially recommend the git plugin -- it's what gives you tab completion for git! I also really like zsh-syntax-highlighting. It highlights valid commands green and invalid ones red, so you don't even have to test the command to see if it will work!

After that, I have boring PATH and git configuration, so I'm going to leave that out.

Finally, we get to my aliases and custom functions. My guilty pleasure function that isn't great practice is entitled 'acp'. 'acp' adds, commits, and pushes my code, and it looks like this:

I use it way too much, but it really speeds things up when I'm working on personal projects.

I have two custom aliases setup:

The first creates random groups of my students for in-class activities and projects. Zen deploys my personal site. Yes, I only have two custom aliases; however, that is just because so many are built into Oh My Zsh!

Some built-in ones I rely on especially hard are '..' which is an alias for 'cd ./.'. You can keep adding periods and keep moving back in directories. You can also omit 'cd' and just type the file name to change from one directory to another -- 'blog' is equivalent to 'cd blog.' There are also other aliases built in to do almost anything you could dream of with git. I also enjoy please=sudo, even though I don't personally use it!

Another bonus utility I have on my computer is tree (which you can install on a Mac with brew install tree). This lists the folders and files in a directory in a really nice way.

Share this post with a friend!

My Visual Studio Code Setup

2018-07-17Read More

Iterm2 + Zsh

A Complete Beginner's Guide to React

2018-08-28Read More

First look at the renderings

Iterm2 download and install

The official website provides two ways to download. The first way is used here. After installation, there is a.oh-my-zshcatalog

Install powerline font set

Iterm2 Zsh Tmux

Modify font
Preferences->Profiles->Text->Font, selectSource Code Pro for Powerline

First, clone iterm2 color schemes. There are many color schemes to choose from here

Import color schemes,
Preferences->Profiles->Colors->Color Presets->import.., under iterm2 color schemes / schemes /Dark+, select the scheme after import

Please refer to Zsh syntax highlighting website for details

Enable plug-ins

I use the default theme hererobbyrussell, for details, see the theme configuration of oh my Zsh official website. I think many people recommend itagnosterTheme, here we can try it

This terminal beautification is over!





Iterm2 Zsh
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE