1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00
ohmyzsh/lib
Caio Romão a3c2a2f6e8 Add branch status support to git_prompt_status
This patch makes git_prompt_status support three new status variables:

 - ZSH_THEME_GIT_PROMPT_AHEAD
 - ZSH_THEME_GIT_PROMPT_BEHIND
 - ZSH_THEME_GIT_PROMPT_DIVERGED

With these extra variables it's easy to see (1) if you have commits in
your local branch that weren't pushed to the remote (AHEAD), (2) if
there are commits in the remote that you haven't merged/rebased yet
(BEHIND) or (3) if you have local unpushed commits AND the remote has
some commits you haven't merged yet (DIVERGED).

Refer to the first line displayed on `git status -b --porcelain`.

An example setup in a .zsh-theme file would be:

ZSH_THEME_GIT_PROMPT_AHEAD="↑"
ZSH_THEME_GIT_PROMPT_BEHIND="↓"
ZSH_THEME_GIT_PROMPT_DIVERGED="↕"
2012-07-29 20:18:26 +02:00
..
aliases.zsh Added extract plugin. 2011-06-01 20:33:16 -04:00
completion.zsh Change hardcoded ~/.oh-my-zsh to $ZSH. 2012-06-12 10:18:02 +02:00
correction.zsh Don't correct hpodder commands. 2010-06-05 23:23:53 +08:00
directories.zsh made the 'd' alias only show the directories that can be cd'ed to using the number aliases 2012-02-28 13:52:57 -05:00
edit-command-line.zsh C-x C-e to edit current command in EDITOR 2011-07-18 09:54:59 -04:00
functions.zsh Fix upgrade and uninstall functions to pick up $ZSH value 2011-12-25 19:53:55 +05:30
git.zsh Add branch status support to git_prompt_status 2012-07-29 20:18:26 +02:00
grep.zsh Moving all zsh config options into a lib/ subdirectory to make way for some upcoming changes to directory structure and configuration options 2009-09-23 07:43:36 -07:00
history.zsh Removed duplicate setting and sorted the remaining 2011-12-03 13:18:37 +01:00
key-bindings.zsh Don't clobber standard Esc+. behavior 2012-03-17 22:03:01 -03:00
misc.zsh Pager is 'less -R' to support colored outputs 2012-03-01 10:27:19 +02:00
rvm.zsh Import rvm prompt 2010-05-28 08:13:17 +08:00
spectrum.zsh Add utility method to spectrum 2011-07-23 11:09:45 -04:00
termsupport.zsh Disabled title function for emacs term mode 2012-03-07 07:47:34 -05:00
theme-and-appearance.zsh Merge branch 'nicoulaj-theme' of https://github.com/nicoulaj/oh-my-zsh into nicoulaj-nicoulaj-theme 2011-02-21 21:45:00 -08:00