Skip to content

Instantly share code, notes, and snippets.

@SeppoTakalo
Last active November 20, 2023 21:38
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save SeppoTakalo/f526f761a44f07464cb5df89c8a9389e to your computer and use it in GitHub Desktop.
Save SeppoTakalo/f526f761a44f07464cb5df89c8a9389e to your computer and use it in GitHub Desktop.
Tune Mac OS X terminal

This page lists my personal preferences to set up proper command line for Mac OS X.

Change default shell to ZSH

Current default for Mac OS X Catalina, offers much better customizations that Bash.

chsh -s /bin/zsh

Install Homebrew

https://brew.sh/

Install Iterm2

https://iterm2.com/

brew cask install iterm2

Install better command line tools

  1. Python 3
  2. GNU coreutils
  3. GNU findutils
  4. https://github.com/sharkdp/fd
  5. https://github.com/ggreer/the_silver_searcher
brew install python coreutils findutils fd the_silver_searcher tree

Customize ZSH by installling Oh-my-ZSH

https://github.com/robbyrussell/oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install PowerLevel10k theme

https://github.com/romkatv/powerlevel10k

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

And chage line in .zshrc

ZSH_THEME=powerlevel10k/powerlevel10k

When you restart the shell, it will run through Wizard to set it up, and install proper fonts for it.

Set up color LS

https://github.com/seebi/dircolors-solarized Copy one of the theme to ~/.dircolors

Helpful plugins

  1. https://github.com/zsh-users/zsh-syntax-highlighting
  2. https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Modify .zshrc plugins to:

plugins=(
    colored-man-pages
    colorize
    osx
    history-substring-search
    gitfast
    jira
    zsh-autosuggestions
    z
    web-search
    zsh-syntax-highlighting
)
# Note zsh-syntax-highlighting must be the last one

More info

  1. https://gist.github.com/kevin-smets/8568070
  2. https://sourabhbajaj.com/mac-setup/
@nevergiveup777
Copy link

Very nice! Thank you, mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment