mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
improve dlin theme color and root prompt
This commit is contained in:
parent
38062cb5d6
commit
82aa8dbddd
1 changed files with 6 additions and 3 deletions
|
|
@ -1,8 +1,11 @@
|
||||||
# Based on cypher and 's prompt http://blog.mired.org/2011/02/adding-vcs-to-zshs-vcsinfo.html
|
# Based on cypher and 's prompt http://blog.mired.org/2011/02/adding-vcs-to-zshs-vcsinfo.html
|
||||||
# @author Daniel YC Lin <dlin.tw at gmail>
|
# @author Daniel YC Lin <dlin.tw at gmail>
|
||||||
# Shows the exit status of the last command if non-zero
|
# Shows the exit status of the last command if non-zero
|
||||||
# Uses "#" instead of "»" when running with elevated privileges
|
# Uses "#" instead of "$" when running as root
|
||||||
PROMPT="%{$fg_bold[green]%}%D{%H:%M:%S}%(0?. . ${fg[red]}%? )%{${fg[blue]}%}$%{${reset_color}%} "
|
p_time="%K{black}%B%F{yellow}%D{%H:%M:%S}%k"
|
||||||
|
p_ret="%(0?.. %F{red}%? )"
|
||||||
|
p_ps="%B%F{blue}%(#.#.$)%b "
|
||||||
|
PROMPT="$p_time$ret$p_ps%{$reset_color%}"
|
||||||
|
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
precmd () { vcs_info }
|
precmd () { vcs_info }
|
||||||
|
|
@ -16,5 +19,5 @@ zstyle ':vcs_info:*' unstagedstr "%{$fg_no_bold[red]%}"
|
||||||
zstyle ':vcs_info:*' stagedstr "%{$fg_no_bold[yellow]%}"
|
zstyle ':vcs_info:*' stagedstr "%{$fg_no_bold[yellow]%}"
|
||||||
zstyle ':vcs_info:*' enable fossil hg svn git cvs # p4 off, but must be last.
|
zstyle ':vcs_info:*' enable fossil hg svn git cvs # p4 off, but must be last.
|
||||||
|
|
||||||
RPROMPT='%n@%m %{$fg_no_bold[magenta]%}%3~%{$fg_no_bold[green]%}${vcs_info_msg_0_}%{$reset_color%}'
|
RPROMPT='%F{green}%n@%m %F{magenta}%3~${vcs_info_msg_0_}%{$reset_color%}'
|
||||||
setopt PROMPT_SUBST
|
setopt PROMPT_SUBST
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue