diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-08-08 20:51:18 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-08-08 20:51:18 +0200 |
commit | 896b5e31f1f6e3253b38ddde16be70b4f54b11af (patch) | |
tree | de8829d69246f93849ada4f142fc154df447a623 /zsh | |
parent | b628450dd592f65073b5628f8da8884e1deada2d (diff) | |
download | dotfiles-896b5e31f1f6e3253b38ddde16be70b4f54b11af.tar.xz |
zshrc: Redid PS1 again, two lines now
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/.zshrc | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -49,21 +49,20 @@ function yellow { printf "%s%s%s" "%{${fg[yellow]}%}" "$1" "$DEFAULT_COLOR" } function black { printf "%s%s%s" "%{${fg[black]}%}" "$1" "$DEFAULT_COLOR" } function white { printf "%s%s%s" "%{${fg[white]}%}" "$1" "$DEFAULT_COLOR" } function prompt_user_color { - (( UID )) && printf green || print red + (( UID )) && print -n red || print -n magenta } -PS1='$(yellow "$(bold %m)") \ +PROMPT="$(yellow "┌─[") $(yellow "$(bold %m)") \ $($(prompt_user_color) "$(bold %n)") \ -$(blue "$(bold %~)") \ -$(blue "$(bold %#)") ' -RPS1=$'$(yellow $branch)' +$(blue "$(bold %~)") $(magenta $(bold '$branch'))$(yellow "]") +$(yellow "└─╼") " function get_git_branch { - if [[ -d .git ]]; then - branch=" $(git rev-parse --abbrev-ref HEAD) " - else - branch=" " - fi + if [[ -d .git ]]; then + branch="$(git rev-parse --abbrev-ref HEAD) " + else + branch="" + fi } # Print basic prompt to the window title |