aboutsummaryrefslogtreecommitdiffstats
path: root/_zsh/prompt.zsh
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-04-30 15:13:55 +0800
committerAaron LI <aaronly.me@gmail.com>2016-04-30 15:13:55 +0800
commitc381c0c531a78ff4b1a1907c10da4ff54a112f0a (patch)
treeb194beb791c36b31fd1f3333d2f20f07462fe516 /_zsh/prompt.zsh
parent3d6f015f851398d0ce1e509cd6fd88e74c7626f6 (diff)
downloaddotfiles-c381c0c531a78ff4b1a1907c10da4ff54a112f0a.tar.bz2
_zsh: simplify initialization; order by perfix
Diffstat (limited to '_zsh/prompt.zsh')
-rw-r--r--_zsh/prompt.zsh34
1 files changed, 0 insertions, 34 deletions
diff --git a/_zsh/prompt.zsh b/_zsh/prompt.zsh
deleted file mode 100644
index 6c1911a..0000000
--- a/_zsh/prompt.zsh
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# zsh/prompt.zsh
-#
-
-function git_prompt_info {
- local ref=$(=git symbolic-ref HEAD 2> /dev/null)
- local gitst="$(=git status 2> /dev/null)"
-
- if [[ -f .git/MERGE_HEAD ]]; then
- if [[ ${gitst} =~ "unmerged" ]]; then
- gitstatus=" %{$fg[red]%}unmerged%{$reset_color%}"
- else
- gitstatus=" %{$fg[green]%}merged%{$reset_color%}"
- fi
- elif [[ ${gitst} =~ "Changes to be committed" ]]; then
- gitstatus=" %{$fg[blue]%}!%{$reset_color%}"
- elif [[ ${gitst} =~ "use \"git add" ]]; then
- gitstatus=" %{$fg[red]%}!%{$reset_color%}"
- elif [[ -n `git checkout HEAD 2> /dev/null | grep ahead` ]]; then
- gitstatus=" %{$fg[yellow]%}*%{$reset_color%}"
- else
- gitstatus=''
- fi
-
- if [[ -n $ref ]]; then
- echo "%{$fg_bold[green]%}/${ref#refs/heads/}%{$reset_color%}$gitstatus"
- fi
-}
-
-PROMPT='%{$fg_bold[blue]%}%~%<< $(git_prompt_info)%{$fg_bold[red]%}%(?..[%?])${PR_BOLD_WHITE}>%{$reset_color%} '
-
-SPROMPT="zsh: correct %{$fg_bold[red]%}%R%{$reset_color%} to %{$fg_bold[green]%}%r%{$reset_color%} [(y)es (n)o (a)bort (e)dit]? "
-
-# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #