aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zshrc
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-08-08 20:51:18 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2014-08-08 20:51:18 +0200
commit896b5e31f1f6e3253b38ddde16be70b4f54b11af (patch)
treede8829d69246f93849ada4f142fc154df447a623 /zsh/.zshrc
parentb628450dd592f65073b5628f8da8884e1deada2d (diff)
downloaddotfiles-896b5e31f1f6e3253b38ddde16be70b4f54b11af.tar.xz
zshrc: Redid PS1 again, two lines now
Diffstat (limited to 'zsh/.zshrc')
-rw-r--r--zsh/.zshrc19
1 files changed, 9 insertions, 10 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index d6a21e2..2cac9e2 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -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