From 4557e863db57e1b1030cc3c6193aa3cb0cdf0591 Mon Sep 17 00:00:00 2001 From: samedamci Date: Fri, 13 Mar 2020 21:34:38 +0100 Subject: [PATCH] Modify zsh prompt --- botfiles/.zshrc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/botfiles/.zshrc b/botfiles/.zshrc index de1b1f2..56f3369 100644 --- a/botfiles/.zshrc +++ b/botfiles/.zshrc @@ -19,11 +19,10 @@ source "${HOME}/.aliases" source "${HOME}/.zprofile" # Prompt -source ~/.config/zsh/plugins/zsh-git-prompt/zshrc.sh -#export PROMPT="%B%F{blue}%~ %b%f$ " -export PROMPT=' %F{#299b9b}%~ %f -[%B%F{red}%?%f%b]%F{#299b9b}%B>%b%f ' -export RPROMPT='$(git_status)' +setopt prompt_subst +setopt autocd +PROMPT='%F{green}%m%f in %B%F{#299b9b}%~%f%b $(git_status) +%f%b% {%B%F{red}%?%f%b}%F{#299b9b}%B>%b%f ' function git_status() { ref=$(git symbolic-ref --quiet --short HEAD 2> /dev/null || git rev-parse --short HEAD 2> /dev/null)