Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JM-Mendez/72dc393c21cfc524c75cb8b579152110 to your computer and use it in GitHub Desktop.
Save JM-Mendez/72dc393c21cfc524c75cb8b579152110 to your computer and use it in GitHub Desktop.
Zsh / Oh-my-zsh on Windows Git Bash

Steps:

  1. Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64

Example:

zsh-5.7.1-1-x86_64.pkg.tar.xz
  1. Extract the content to your git bash installation dir: Usually C:\Program Files\Git

  2. Test it, open git bash and type:

zsh
  1. If it start the zsh, it is working fine.

On some cases, there are stranger characters on the cmd line. It will get fixed when installing the oh-my-zsh

  1. Installing oh-my-zsh, execute the following cmd on git bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  1. Configuring zsh as default shell Edit the ~/.bashrc file.

Add the following lines at the end of the file

# Launch Zsh
if [ -t 1 ]; then
exec zsh
fi

Close and open again the git bash.

Optional steps

  1. Installing the Honukay theme
curl -fsSL https://raw.githubusercontent.com/oskarkrawczyk/honukai-iterm/master/honukai.zsh-theme -o ~/.oh-my-zsh/custom/themes/honukai.zsh-theme
  1. Set it
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="honukai"/g' ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment