Configure your macOS command-line for a smoother development experience
The default Terminal experience on macOS is not bad, but there are several things you can do to make working with the command-line a nicer experience. Whether it's working with Git, writing Bash scripts, working with the AWS CLI, debugging code, ..., developers spent a lot of time working within a command-line environment. Due to the amount of time that we use the command-line, small optimisations can make a huge difference in your productivity.
Step 1: Install a custom font
We want to install a font that is both easy on the eyes and that is rich enough, so that it allows us to create a nice command-line prompt later on that includes some status information using icons (as in the image above). For this purpose I install the Powerline fonts. The below script clones the repository, installs the fonts and then removes the repository again.
# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts
Once the fonts are installed we can choose one of the fonts to use. I tend to use Meslo LG L DZ
with 16pt
as the size, for my command-line configuration.
See Step 2 in case you want to download the font and color configuration I use on a day-to-day basis.
- Terminal: Settings -> Profiles -> Select profile tab -> Select text tab -> Choose font
- IntelliJ: Settings -> Editor -> Color Scheme -> Console Font -> Select 'Use console font instead of the default' -> Choose font
- iTerm2: Settings -> Profiles -> Select profile tab -> Select text tab -> Choose font
Step 2: Configure a color scheme
The default command-line colors are not easy on the eyes, so I tend to use a custom color scheme. You can import one or all of the below files to customize colors in the tools you use.
Note: that the files will customize your font to Meslo as well.
- Terminal: Terminal profile
- IntelliJ: IntelliJ Console colors
- iTerm2: iTerm2 profile
Step 3: Install Oh My ZSH
TO DO