Skip to content

Commit

Permalink
Use precmd to write two lines prompt in oh-my-zsh theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
marciotoshio committed Sep 9, 2021
1 parent 087d8e8 commit 17370ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .oh-my-zsh/custom/themes/toshio.zsh-theme
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local bel=$(tput bel)
local ret_status="%(?:%{$fg_bold[green]%}➜:$bel%{$fg_bold[red]%}✗)"

PROMPT='[%n] | %{$fg[white]%}%w %*%{$reset_color%} [%{$fg[blue]%}$(rvm-prompt)%{$reset_color%}]
${ret_status}%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
precmd() { print -rP '[%n] | %{$fg[white]%}%w %*%{$reset_color%} [%{$fg[blue]%}$(rvm-prompt)%{$reset_color%}]' }

PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
Expand Down

0 comments on commit 17370ff

Please sign in to comment.