aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-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