mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Adds tracking of ahead local commits from remote
This commit is contained in:
parent
1389a1178a
commit
6442cf66c4
102 changed files with 9 additions and 2 deletions
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
README.textile
Normal file → Executable file
0
README.textile
Normal file → Executable file
0
custom/example.zsh
Normal file → Executable file
0
custom/example.zsh
Normal file → Executable file
0
lib/aliases.zsh
Normal file → Executable file
0
lib/aliases.zsh
Normal file → Executable file
0
lib/completion.zsh
Normal file → Executable file
0
lib/completion.zsh
Normal file → Executable file
0
lib/correction.zsh
Normal file → Executable file
0
lib/correction.zsh
Normal file → Executable file
0
lib/directories.zsh
Normal file → Executable file
0
lib/directories.zsh
Normal file → Executable file
0
lib/functions.zsh
Normal file → Executable file
0
lib/functions.zsh
Normal file → Executable file
0
lib/git.zsh
Normal file → Executable file
0
lib/git.zsh
Normal file → Executable file
0
lib/grep.zsh
Normal file → Executable file
0
lib/grep.zsh
Normal file → Executable file
0
lib/history.zsh
Normal file → Executable file
0
lib/history.zsh
Normal file → Executable file
0
lib/key-bindings.zsh
Normal file → Executable file
0
lib/key-bindings.zsh
Normal file → Executable file
0
lib/misc.zsh
Normal file → Executable file
0
lib/misc.zsh
Normal file → Executable file
0
lib/rvm.zsh
Normal file → Executable file
0
lib/rvm.zsh
Normal file → Executable file
0
lib/spectrum.zsh
Normal file → Executable file
0
lib/spectrum.zsh
Normal file → Executable file
0
lib/termsupport.zsh
Normal file → Executable file
0
lib/termsupport.zsh
Normal file → Executable file
0
lib/theme-and-appearance.zsh
Normal file → Executable file
0
lib/theme-and-appearance.zsh
Normal file → Executable file
0
log/.easter-egg
Normal file → Executable file
0
log/.easter-egg
Normal file → Executable file
0
oh-my-zsh.sh
Normal file → Executable file
0
oh-my-zsh.sh
Normal file → Executable file
0
plugins/brew/_brew
Normal file → Executable file
0
plugins/brew/_brew
Normal file → Executable file
0
plugins/brew/brew.plugin.zsh
Normal file → Executable file
0
plugins/brew/brew.plugin.zsh
Normal file → Executable file
0
plugins/cap/cap.plugin.zsh
Normal file → Executable file
0
plugins/cap/cap.plugin.zsh
Normal file → Executable file
0
plugins/command-not-found/command-not-found.plugin.zsh
Normal file → Executable file
0
plugins/command-not-found/command-not-found.plugin.zsh
Normal file → Executable file
0
plugins/dirpersist/dirpersist.plugin.zsh
Normal file → Executable file
0
plugins/dirpersist/dirpersist.plugin.zsh
Normal file → Executable file
0
plugins/gem/_gem
Normal file → Executable file
0
plugins/gem/_gem
Normal file → Executable file
0
plugins/gem/gem.plugin.zsh
Normal file → Executable file
0
plugins/gem/gem.plugin.zsh
Normal file → Executable file
0
plugins/git/git.plugin.zsh
Normal file → Executable file
0
plugins/git/git.plugin.zsh
Normal file → Executable file
0
plugins/github/_github
Normal file → Executable file
0
plugins/github/_github
Normal file → Executable file
0
plugins/github/github.plugin.zsh
Normal file → Executable file
0
plugins/github/github.plugin.zsh
Normal file → Executable file
0
plugins/lighthouse/lighthouse.plugin.zsh
Normal file → Executable file
0
plugins/lighthouse/lighthouse.plugin.zsh
Normal file → Executable file
0
plugins/macports/macports.plugin.zsh
Normal file → Executable file
0
plugins/macports/macports.plugin.zsh
Normal file → Executable file
0
plugins/mysql/mysql-macports.plugin.zsh
Normal file → Executable file
0
plugins/mysql/mysql-macports.plugin.zsh
Normal file → Executable file
0
plugins/osx/osx.plugin.zsh
Normal file → Executable file
0
plugins/osx/osx.plugin.zsh
Normal file → Executable file
0
plugins/phing/phing.plugin.zsh
Normal file → Executable file
0
plugins/phing/phing.plugin.zsh
Normal file → Executable file
0
plugins/pip/_pip
Normal file → Executable file
0
plugins/pip/_pip
Normal file → Executable file
0
plugins/pip/pip.plugin.zsh
Normal file → Executable file
0
plugins/pip/pip.plugin.zsh
Normal file → Executable file
0
plugins/rails/rails.plugin.zsh
Normal file → Executable file
0
plugins/rails/rails.plugin.zsh
Normal file → Executable file
0
plugins/ruby/ruby.plugin.zsh
Normal file → Executable file
0
plugins/ruby/ruby.plugin.zsh
Normal file → Executable file
0
plugins/ssh-agent/ssh-agent.plugin.zsh
Normal file → Executable file
0
plugins/ssh-agent/ssh-agent.plugin.zsh
Normal file → Executable file
0
plugins/textmate/textmate.plugin.zsh
Normal file → Executable file
0
plugins/textmate/textmate.plugin.zsh
Normal file → Executable file
0
plugins/vagrant/_vagrant
Normal file → Executable file
0
plugins/vagrant/_vagrant
Normal file → Executable file
0
plugins/vagrant/vagrant.plugin.zsh
Normal file → Executable file
0
plugins/vagrant/vagrant.plugin.zsh
Normal file → Executable file
0
plugins/vi-mode/vi-mode.plugin.zsh
Normal file → Executable file
0
plugins/vi-mode/vi-mode.plugin.zsh
Normal file → Executable file
0
templates/zshrc.zsh-template
Normal file → Executable file
0
templates/zshrc.zsh-template
Normal file → Executable file
0
themes/Soliah.zsh-theme
Normal file → Executable file
0
themes/Soliah.zsh-theme
Normal file → Executable file
0
themes/afowler.zsh-theme
Normal file → Executable file
0
themes/afowler.zsh-theme
Normal file → Executable file
0
themes/arrow.zsh-theme
Normal file → Executable file
0
themes/arrow.zsh-theme
Normal file → Executable file
0
themes/aussiegeek.zsh-theme
Normal file → Executable file
0
themes/aussiegeek.zsh-theme
Normal file → Executable file
0
themes/bira.zsh-theme
Normal file → Executable file
0
themes/bira.zsh-theme
Normal file → Executable file
0
themes/candy.zsh-theme
Normal file → Executable file
0
themes/candy.zsh-theme
Normal file → Executable file
0
themes/clean.zsh-theme
Normal file → Executable file
0
themes/clean.zsh-theme
Normal file → Executable file
0
themes/cloud.zsh-theme
Normal file → Executable file
0
themes/cloud.zsh-theme
Normal file → Executable file
0
themes/cypher.zsh-theme
Normal file → Executable file
0
themes/cypher.zsh-theme
Normal file → Executable file
0
themes/dallas.zsh-theme
Normal file → Executable file
0
themes/dallas.zsh-theme
Normal file → Executable file
0
themes/darkblood.zsh-theme
Normal file → Executable file
0
themes/darkblood.zsh-theme
Normal file → Executable file
0
themes/daveverwer.zsh-theme
Normal file → Executable file
0
themes/daveverwer.zsh-theme
Normal file → Executable file
0
themes/dst.zsh-theme
Normal file → Executable file
0
themes/dst.zsh-theme
Normal file → Executable file
0
themes/dstufft.zsh-theme
Normal file → Executable file
0
themes/dstufft.zsh-theme
Normal file → Executable file
0
themes/duellj.zsh-theme
Normal file → Executable file
0
themes/duellj.zsh-theme
Normal file → Executable file
0
themes/eastwood.zsh-theme
Normal file → Executable file
0
themes/eastwood.zsh-theme
Normal file → Executable file
0
themes/edvardm.zsh-theme
Normal file → Executable file
0
themes/edvardm.zsh-theme
Normal file → Executable file
0
themes/evan.zsh-theme
Normal file → Executable file
0
themes/evan.zsh-theme
Normal file → Executable file
0
themes/example.zsh-theme
Normal file → Executable file
0
themes/example.zsh-theme
Normal file → Executable file
0
themes/fletcherm.zsh-theme
Normal file → Executable file
0
themes/fletcherm.zsh-theme
Normal file → Executable file
0
themes/funky.zsh-theme
Normal file → Executable file
0
themes/funky.zsh-theme
Normal file → Executable file
0
themes/gallifrey.zsh-theme
Normal file → Executable file
0
themes/gallifrey.zsh-theme
Normal file → Executable file
0
themes/garyblessington.zsh-theme
Normal file → Executable file
0
themes/garyblessington.zsh-theme
Normal file → Executable file
0
themes/geoffgarside.zsh-theme
Normal file → Executable file
0
themes/geoffgarside.zsh-theme
Normal file → Executable file
0
themes/gozilla.zsh-theme
Normal file → Executable file
0
themes/gozilla.zsh-theme
Normal file → Executable file
0
themes/imajes.zsh-theme
Normal file → Executable file
0
themes/imajes.zsh-theme
Normal file → Executable file
0
themes/jbergantine.zsh-theme
Normal file → Executable file
0
themes/jbergantine.zsh-theme
Normal file → Executable file
0
themes/jnrowe.zsh-theme
Normal file → Executable file
0
themes/jnrowe.zsh-theme
Normal file → Executable file
0
themes/josh.zsh-theme
Normal file → Executable file
0
themes/josh.zsh-theme
Normal file → Executable file
0
themes/jreese.zsh-theme
Normal file → Executable file
0
themes/jreese.zsh-theme
Normal file → Executable file
|
|
@ -9,9 +9,16 @@ function git_prompt_sha() {
|
|||
echo "%{$fg[white]%}[%{$fg[yellow]%}"$sha"%{$fg[white]%}]"
|
||||
}
|
||||
|
||||
# Checks if there are commits ahead from remote
|
||||
function git_parse_ahead() {
|
||||
if $(echo "$(git log origin/master..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||
echo " %{$fg[red]%}(!)"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prompts
|
||||
PROMPT='
|
||||
%{$fg_bold[green]%}%n@%m%{$fg[white]%}:%{$fg[yellow]%}%~%u$(parse_git_dirty)%{$reset_color%}
|
||||
%{$fg_bold[green]%}%n@%m%{$fg[white]%}:%{$fg[yellow]%}%~%u$(parse_git_dirty)$(git_parse_ahead)%{$reset_color%}
|
||||
%{$fg[blue]%}>%{$reset_color%} '
|
||||
RPROMPT='%{$fg_bold[green]%}$(current_branch) $(git_prompt_sha) $(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
|
|
@ -22,6 +29,6 @@ ZSH_THEME_GIT_PROMPT_DELETED=" %{$fg[red]%}deleted "
|
|||
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$fg[yellow]%}renamed "
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$fg[yellow]%}modified "
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" %{$fg[green]%}added "
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$fg[white]%}untracked "
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}(*)"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
0
themes/kennethreitz.zsh-theme
Normal file → Executable file
0
themes/kennethreitz.zsh-theme
Normal file → Executable file
0
themes/linuxonly
Normal file → Executable file
0
themes/linuxonly
Normal file → Executable file
0
themes/lukerandall.zsh-theme
Normal file → Executable file
0
themes/lukerandall.zsh-theme
Normal file → Executable file
0
themes/macovsky-ruby.zsh-theme
Normal file → Executable file
0
themes/macovsky-ruby.zsh-theme
Normal file → Executable file
0
themes/macovsky.zsh-theme
Normal file → Executable file
0
themes/macovsky.zsh-theme
Normal file → Executable file
0
themes/maran.zsh-theme
Normal file → Executable file
0
themes/maran.zsh-theme
Normal file → Executable file
0
themes/mgutz.zsh-theme
Normal file → Executable file
0
themes/mgutz.zsh-theme
Normal file → Executable file
0
themes/mikeh.zsh-theme
Normal file → Executable file
0
themes/mikeh.zsh-theme
Normal file → Executable file
0
themes/mrtazz.zsh-theme
Normal file → Executable file
0
themes/mrtazz.zsh-theme
Normal file → Executable file
0
themes/philips.zsh-theme
Normal file → Executable file
0
themes/philips.zsh-theme
Normal file → Executable file
0
themes/pmcgee.zsh-theme
Normal file → Executable file
0
themes/pmcgee.zsh-theme
Normal file → Executable file
0
themes/rgm.zsh-theme
Normal file → Executable file
0
themes/rgm.zsh-theme
Normal file → Executable file
0
themes/risto.zsh-theme
Normal file → Executable file
0
themes/risto.zsh-theme
Normal file → Executable file
0
themes/robbyrussell.zsh-theme
Normal file → Executable file
0
themes/robbyrussell.zsh-theme
Normal file → Executable file
0
themes/skaro.zsh-theme
Normal file → Executable file
0
themes/skaro.zsh-theme
Normal file → Executable file
0
themes/sporty_256.zsh-theme
Normal file → Executable file
0
themes/sporty_256.zsh-theme
Normal file → Executable file
0
themes/takashiyoshida.zsh-theme
Normal file → Executable file
0
themes/takashiyoshida.zsh-theme
Normal file → Executable file
0
themes/theunraveler.zsh-theme
Normal file → Executable file
0
themes/theunraveler.zsh-theme
Normal file → Executable file
0
themes/thomasjbradley.zsh-theme
Normal file → Executable file
0
themes/thomasjbradley.zsh-theme
Normal file → Executable file
0
themes/tonotdo.zsh-theme
Normal file → Executable file
0
themes/tonotdo.zsh-theme
Normal file → Executable file
0
themes/wezm+.zsh-theme
Normal file → Executable file
0
themes/wezm+.zsh-theme
Normal file → Executable file
0
themes/wezm.zsh-theme
Normal file → Executable file
0
themes/wezm.zsh-theme
Normal file → Executable file
0
themes/xiong-chiamiov-plus.zsh-theme
Normal file → Executable file
0
themes/xiong-chiamiov-plus.zsh-theme
Normal file → Executable file
0
themes/xiong-chiamiov.zsh-theme
Normal file → Executable file
0
themes/xiong-chiamiov.zsh-theme
Normal file → Executable file
0
tools/check_for_upgrade.sh
Normal file → Executable file
0
tools/check_for_upgrade.sh
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue