Update 2024-12-25 15:43 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-12-25 15:43:38 +01:00
parent 346463127c
commit 1f15f715a6

7
.kshrc
View File

@ -131,7 +131,7 @@ gitstatus() {
_path="$PWD" _path="$PWD"
while [ -n "$_path" ] while [ -n "$_path" ]
do [ -d "$_path/.git" ] \ do [ -d "$_path/.git" ] \
&& echo " ($(git branch --no-color --show-current)) " \ && echo "($(git branch --no-color --show-current))" \
&& break && break
_path="${_path%/*}" _path="${_path%/*}"
done done
@ -141,7 +141,12 @@ if [ $(id -u) -eq 0 ]
then then
PS1="${x}${RED}\${?}|\w\\$ ${RESET}${x}" PS1="${x}${RED}\${?}|\w\\$ ${RESET}${x}"
else else
if command -v git > /dev/null
then
PS1="${x}${GREY}\${?}|\w\$(gitstatus)\\$ ${RESET}${x}" PS1="${x}${GREY}\${?}|\w\$(gitstatus)\\$ ${RESET}${x}"
else
PS1="${x}${GREY}\${?}|\w\\$ ${RESET}${x}"
fi
fi fi
######################################################################## ########################################################################