chore(zsh): simple new prompt
This commit is contained in:
parent
a9efc146f7
commit
04cef834ba
3 changed files with 18 additions and 11 deletions
17
.config/zsh/prompts/simple-two-line.zsh
Normal file
17
.config/zsh/prompts/simple-two-line.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
autoload -Uz vcs_info
|
||||
precmd() {
|
||||
vcs_info
|
||||
setopt PROMPT_SUBST
|
||||
if [[ -n "$vcs_info_msg_0_" ]]; then
|
||||
PROMPT='%F{blue}%~%F{yellow} (${vcs_info_msg_0_})%f'$'\n''%F{magenta}❯ '
|
||||
else
|
||||
PROMPT='%F{blue}%~%f'$'\n''%F{magenta}❯ '
|
||||
fi
|
||||
print -P ""
|
||||
}
|
||||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:git*' formats '%b'
|
||||
|
||||
# Simple prompt initialization
|
||||
autoload -U promptinit; promptinit
|
Loading…
Add table
Add a link
Reference in a new issue