From 6eaab0b75f6575f5309083d43d4c25de1089b79c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 16 Nov 2024 02:49:14 +0100 Subject: [PATCH] fixes --- shell/shell.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/shell.sh b/shell/shell.sh index 52a00f3..b984e6c 100644 --- a/shell/shell.sh +++ b/shell/shell.sh @@ -49,13 +49,14 @@ esac # prompt ps1() { - local date host id + local date host id type local code="${1}" date="$(date +%H:%M:%S)" local git host="$(hostname)" id="$(id --user)" local path="${PWD}" + type="$(type -t __git_ps1)" local user="${USER}" local view="└ " # code @@ -69,7 +70,7 @@ ps1() { view="${view}${SH_DEFAULT} @ " view="${view}${SH_BROWN}${date}" # git - if [ "$(type -t __git_ps1)" = "function" ]; then + if [ "${type}" = "function" ]; then git="$(__git_ps1)" if [ -n "${git}" ]; then view="${view}${SH_DEFAULT} –${SH_MAGENTA}${git}"