summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2009-11-09 07:33:51 -0800
committerRobby Russell <robby@planetargon.com>2009-11-09 07:33:51 -0800
commitc620408962dd93fe920414eedd8e8e38b241eb08 (patch)
treeb6d9c9bc7fec4f8c51a21e60e0c51cbb091381ee
parent5c13930832b3e3bfcfd7b8ea99283ef477903bfd (diff)
downloadzsh-c620408962dd93fe920414eedd8e8e38b241eb08.tar.gz
zsh-c620408962dd93fe920414eedd8e8e38b241eb08.tar.bz2
zsh-c620408962dd93fe920414eedd8e8e38b241eb08.zip
Revert "Added my prompt theme, with a tweak to the core oh-my-zsh to support it. My git_prompt_info function not only reports the branch and dirty status, but also whether or not the branch is ahead or behind of the remote, or both. It also switches the prompt colour from green to red if the previous command exited with a non-zero value (i.e. failed)."
This reverts commit 14a1ce80bbf7362ab2856cdd050714f02649fe3f.
-rw-r--r--lib/termsupport.zsh2
-rw-r--r--themes/lazyatom.zsh-theme40
2 files changed, 0 insertions, 42 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index ec828c287..fef978748 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -4,7 +4,6 @@ case "$TERM" in
print -Pn "\e]0;%n@%m: $1\a" # xterm
}
precmd () {
- oh_my_zsh_theme_precmd
print -Pn "\e]0;%n@%m: %~\a" # xterm
}
;;
@@ -15,7 +14,6 @@ case "$TERM" in
print -Pn "\e]0;%n@%m: $1\a" # xterm
}
precmd () {
- oh_my_zsh_theme_precmd
echo -ne "\ekzsh\e\\"
print -Pn "\e]0;%n@%m: %~\a" # xterm
}
diff --git a/themes/lazyatom.zsh-theme b/themes/lazyatom.zsh-theme
deleted file mode 100644
index 6263bc2b7..000000000
--- a/themes/lazyatom.zsh-theme
+++ /dev/null
@@ -1,40 +0,0 @@
-git_prompt_info() {
- branch=$(git symbolic-ref HEAD 2> /dev/null) || return
- git_status="$(git status 2> /dev/null)"
- state=""
- case $git_status in
- *Changed\ but\ not\ updated*)
- state="%{$fg[red]%}⚡"
- ;;;
- *Untracked\ files*)
- state="%{$fg[red]%}⚡"
- ;;;
- esac
-
- remote=""
- case $git_status in
- *Your\ branch\ is\ ahead*)
- remote="%{$fg[yellow]%}↑"
- ;;;
-
- *Your\ branch\ is\ behind*)
- remote="%{$fg[yellow]%}↓"
- ;;;
-
- "Your branch and")
- remote="%{$fg[yellow]%}"
- ;;;
- esac
- echo " %{$fg[yellow]%}(${branch#refs/heads/})${remote}${state}"
-}
-
-function oh_my_zsh_theme_precmd() {
- local previous_return_value=$?;
- prompt="%{$fg[light_gray]%}%c%{$fg[yellow]%}$(git_prompt_info)%{$fg[white]%}"
- if test $previous_return_value -eq 0
- then
- export PROMPT="%{$fg[green]%}➜ %{$fg[white]%}${prompt}%{$fg[green]%} $%{$fg[white]%} "
- else
- export PROMPT="%{$fg[red]%}➜ %{$fg[white]%}${prompt}%{$fg[red]%} $%{$fg[white]%} "
- fi
-} \ No newline at end of file