mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 8d38305fbb into 291e96dcd0
This commit is contained in:
commit
0357a7947f
2 changed files with 29 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ ZSH_THEME="robbyrussell"
|
|||
plugins=(git)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
source ~/.profile
|
||||
unsetopt correct_all
|
||||
|
||||
# User configuration
|
||||
|
||||
|
|
|
|||
27
themes/bguthrie.zsh-theme
Normal file
27
themes/bguthrie.zsh-theme
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# I hate ZSH's correction feature.
|
||||
setopt nocorrect
|
||||
|
||||
# Found on the ZshWiki: http://zshwiki.org/home/config/prompt
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo "%{$fg[blue]%}λ" && return
|
||||
# These are slow and have therefore been killed:
|
||||
# svn info >/dev/null 2>/dev/null && echo 'λ' && return
|
||||
# hg root >/dev/null 2>/dev/null && echo 'λ' && return
|
||||
echo '$'
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Parsing git dirty status slows down my prompt tremendously without adding much value.
|
||||
# This variant of git_prompt_info just grabs the branch.
|
||||
function git_current_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX%{$fg[blue]%}${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
PROMPT='[%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)]
|
||||
$(prompt_char)%{$reset_color%} '
|
||||
Loading…
Add table
Add a link
Reference in a new issue