Commit graph

5 commits

Author SHA1 Message Date
Robin Ramael
2545e756a1 Fixed bug where a directory under two kinds of SCM, would break the prompt. 2011-02-02 01:27:17 +01:00
Robin Ramael
b989ec489c Infrastructure for displaying scm info in prompt + implemented for git and svn
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)
2011-01-10 17:11:46 +01:00
Toon Claes
bbef2db92b parse error fix 2009-11-05 20:48:08 +01:00
Toon Claes
08fcf7dc39 Enabled colors in ls and made it possible to theme them 2009-11-05 20:44:28 +01:00
Toon Claes
e2dba2c3e9 Joined the appearance so the theme can apply LSCOLORS too 2009-11-04 20:37:18 +01:00