mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
this should not break the old way of putting git info in the prompt.
Also changed awesomepanda theme to use the new scm architecture.
for users:
this works the same as plugins: the scms variable is set in ~/.zshrc with a list of SCM for which info should be displayed in the prompt, as simple as that.
for theme developers:
instead of calling the git_prompt_info function, you can call the get_scm_prompt, which will display info for all the scms in the scms variable.
the following variables can be used in the old git-way:
ZSH_THEME_SCM_PROMPT_PREFIX: before everything but the scm's name (svn, git, ..)
ZSH_THEME_SCM_PROMPT_SUFFIX: after everything
ZSH_THEME_SCM_PROMPT_DIRTY: displayed when the repo is dirty
ZSH_THEME_SCM_PROMPT_CLEAN displated when the repo is clean
by default, the name of the scm (git, svn, ...) is not displayed before the scm info, but this can be changed by setting the ZSH_THEME_SCM_DISPLAY_NAME to 1.
for scm-plugin developers:
to make an scm plugin with the name 'foo':
add a script called 'foo.scm.zsh' in to the scm folder. this script has to contain two functions:
scm_in_foo_repo: checks wether we are in a foo repo, usually by checking if a .foo folder is present
scm_foo_prompt_info: returns the prompt which follows the rules outlined above (in the "for theme developers"-section)
|
||
|---|---|---|
| .. | ||
| brew | ||
| cap | ||
| command-not-found | ||
| dirpersist | ||
| gem | ||
| git | ||
| github | ||
| lighthouse | ||
| macports | ||
| mysql | ||
| osx | ||
| phing | ||
| pip | ||
| rails | ||
| rails3 | ||
| ruby | ||
| ssh-agent | ||
| textmate | ||
| vagrant | ||
| vi-mode | ||