X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/9a1960b5edade792e0d4d9a8c8e0630e774affc5..ce0a0c5d7508416fb022de084ba66732cfeb1ced:/.zsh/zshrc/90_prompt?ds=sidebyside diff --git a/.zsh/zshrc/90_prompt b/.zsh/zshrc/90_prompt index 0abe132..cdde4da 100644 --- a/.zsh/zshrc/90_prompt +++ b/.zsh/zshrc/90_prompt @@ -8,9 +8,15 @@ # Source repository: http://git.madduck.net/v/etc/zsh.git # -is_root && PS1_HL=U -PS1="%${PS1_HL:=B}%m%${(L)PS1_HL}:%25<..<%~%# " -unset PS1_HL -RPS1="#[%(0?..%?,)%!]%v" +_MIDDLE="%1v%(2v.|%B%2v%b|.)%(3v.%3v.)" +if is_root; then + _MIDDLE="%25<..<%~%<<" + _PS1_HL=U +fi +PS1="%${_PS1_HL:=B}%m%${(L)_PS1_HL}:${_MIDDLE}%# " +unset _PS1_HL +unset _MIDDLE + +RPS1="#%(0?..%?,)%!" # vim:ft=zsh