commit 3a39a97faf4fe40cd1d615cbfdbcc0f99e1d9f5b
parent ef80328685842cac0f5c695737a682fde246ae43
Author: hhvn <dev@hhvn.uk>
Date: Sun, 7 Nov 2021 17:36:03 +0000
.c/k/prompt: hide branch too
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.config/ksh/prompt b/.config/ksh/prompt
@@ -21,9 +21,9 @@ __ksh_prompt(){
printf '%s ' "$__ksh_prompt_errorcode"
__prompt_col 5
printf "%s " "$(whoami)"
- __prompt_col 3
- printf "%s" $(git branch 2>/dev/null | grep '^*' | awk '{print $2 "|"}')
[ "$_PROMPT_GIT" = "y" ] && {
+ __prompt_col 3
+ printf "%s" $(git branch 2>/dev/null | grep '^*' | awk '{print $2 "|"}')
__ksh_prompt_diff=$(git diff 2>/dev/null)
[ $? -eq 0 ] && {
printf '%s\n' "$__ksh_prompt_diff" | grep '.' >/dev/null && __prompt_col 8 || __prompt_col 15