zshrc: Add prompt
This commit is contained in:
parent
617afd0d5a
commit
bf9365e30c
22
shrc/zshrc
22
shrc/zshrc
@ -9,15 +9,33 @@ HISTFILE=~/.histfile
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
|
||||
setopt appendhistory autocd extendedglob nomatch prompt_subst
|
||||
setopt appendhistory autocd extendedglob nomatch
|
||||
unsetopt beep notify
|
||||
bindkey -v
|
||||
bindkey -e
|
||||
|
||||
# Partial history matching
|
||||
bindkey '\e[A' history-beginning-search-backward
|
||||
bindkey '\e[B' history-beginning-search-forward
|
||||
|
||||
# Set up styling
|
||||
zstyle :compinstall filename '/home/salt/.zshrc'
|
||||
|
||||
# Completion
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# The prompt
|
||||
autoload -Uz promptinit
|
||||
setopt prompt_percent
|
||||
if [ "$SSH_CLIENT" = "" ]; then
|
||||
PROMPT="[%F{blue}%~"
|
||||
else
|
||||
PROMPT="[%F{red}%B%m%b:%~"
|
||||
fi
|
||||
PROMPT="$PROMPT%f]%(0?..%F{red}?%f)%(!.%F{red}#%f.%F{green}$%f) "
|
||||
promptinit
|
||||
|
||||
# Source .profile
|
||||
if [[ -f "$HOME/.profile" ]]; then
|
||||
source "$HOME/.profile" 2>& /dev/null
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user