Odin is a Z shell theme centered around a Git-heavy workflow. It gives you a comprehensive view of your current branch without cluttering the terminal.
- Add
antigen bundle tylerreckart/odin
to your.zshrc
. - Add
antigen theme tylerreckart/odin odin.zsh-theme
to your.zshrc
to use odin.
Antigen will clone and load the odin repository automatically the next time you start a zsh session.
If you're using oh-my-zsh, follow these steps to install odin:
-
cd zsh_custom/themes
-
git clone https://github.com/tylerreckart/odin.git && cd odin && make
-
Set
ZSH_THEME="odin"
in your.zshrc
If you have any other issues, see the oh-my-zsh documentation for more info.
- Add
zgen load tylerreckart/odin
to your.zshrc
with your otherzgen load
statements zgen save
and zgen will automatically handle cloning the repository for you.
Variable | Indicator | Meaning |
---|---|---|
ZSH_THEME_GIT_PROMPT_UNTRACKED |
◒ | Untracked files |
ZSH_THEME_GIT_PROMPT_ADDED |
✓ | Files added to git |
ZSH_THEME_GIT_PROMPT_MODIFIED |
△ | Modified files |
ZSH_THEME_GIT_PROMPT_DELETED |
✖ | Deleted files |
ZSH_THEME_GIT_PROMPT_RENAMED |
➜ | Renamed files |
ZSH_THEME_GIT_PROMPT_UNMERGED |
§ | Unmerged files |
ZSH_THEME_GIT_PROMPT_AHEAD |
▲ | Repo ahead of current branch |
ZSH_THEME_GIT_PROMPT_DIRTY |
✗ | Dirty repository |
The right hand prompt displays the current branch, time since last commit, as well as commit status of the repository
Variable | Branch Color |
---|---|
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT |
Green |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_MEDIUM |
Yellow |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG |
Red |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL |
White |
The right hand prompt displays the current branch, time since last commit, as well as commit status of the repository
Variable | Branch Color |
---|---|
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT |
Green |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_MEDIUM |
Yellow |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG |
Red |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL |
Grey |
When cloning this repository, you'll find a git folder that contains a git config that I've found to work well with this shell. Just copy the files, .gitconfig
and .gitmessage
over to your home directory and you'll be all set.
MIT Tyler Reckart