mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
own prompt, with some vcs_info
This commit is contained in:
parent
73c940356e
commit
ef06ff6c8a
1 changed files with 15 additions and 1 deletions
16
zshrc
16
zshrc
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
autoload -Uz promptinit
|
autoload -Uz promptinit
|
||||||
promptinit
|
promptinit
|
||||||
prompt walters
|
|
||||||
|
|
||||||
# Set up working dir change event
|
# Set up working dir change event
|
||||||
chpwd() {
|
chpwd() {
|
||||||
|
|
@ -105,5 +104,20 @@ zstyle ':completion:*' verbose true
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
zstyle ':vcs_info:*' enable git hg
|
||||||
|
zstyle ':vcs_info:*' formats "%F{green}%S%f:%F{blue}%b%f:%F{green}%r%f"
|
||||||
|
|
||||||
|
precmd() {
|
||||||
|
psvar=()
|
||||||
|
|
||||||
|
vcs_info
|
||||||
|
RPROMPT="%F{green}%~%f"
|
||||||
|
[[ -n $vcs_info_msg_0_ ]] && RPROMPT="$vcs_info_msg_0_"
|
||||||
|
}
|
||||||
|
|
||||||
|
PS1="%B%(?..[%?] )%b%n@%m> "
|
||||||
|
prompt_opts=(cr percent)
|
||||||
|
|
||||||
source ~/.aliases
|
source ~/.aliases
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue