Ideas and code taken from xero's zsh prompt and eriner's prompt.
- Status segment:
- The current working directory.
- Git segment, only when you're in a git repo:
- Current branch name, or commit short hash when in 'detached HEAD' state.
*when in a dirty working tree.↑and/or↓when there are commits ahead and/or behind of remote, respectively.
This theme can be customized with the following environment variables. If the variable is not defined, the respective default value is used.
| Variable | Description | Default value |
|---|---|---|
| COLOR_ROOT | Root-user mace color | red |
| COLOR_USER | Non-root-user mace color | cyan |
| COLOR_NORMAL | Normal text color | white |
| COLOR_ERROR | Error text color | red |
You can customize how the current working directory is shown with the prompt-pwd module settings.
The git indicators can be customized by changing the following git-info module context formats:
| Context name | Description | Default format |
|---|---|---|
| branch | Branch name | %b |
| commit | Commit short hash | %c... |
| ahead | Ahead of remote | ↑ |
| behind | Behind remote | ↓ |
| dirty | Dirty state | * |
Use the following command to override a git-info context format:
zstyle ':zim:git-info:<context_name>' format '<new_format>'
For detailed information about these and other git-info settings, check the git-info documentation.
These advanced settings must be defined at the bottom of your ~/.zshrc, after
the modules are initialized with source ${ZIM_HOME}/init.zsh, in order to
override the theme defaults.
Requires Zim Framework's prompt-pwd module to show the current working directory, and git-info to show git information.
