Update 2024-12-25 15:43 OpenBSD/amd64-t14
This commit is contained in:
parent
346463127c
commit
1f15f715a6
9
.kshrc
9
.kshrc
@ -131,7 +131,7 @@ gitstatus() {
|
||||
_path="$PWD"
|
||||
while [ -n "$_path" ]
|
||||
do [ -d "$_path/.git" ] \
|
||||
&& echo " ($(git branch --no-color --show-current)) " \
|
||||
&& echo "($(git branch --no-color --show-current))" \
|
||||
&& break
|
||||
_path="${_path%/*}"
|
||||
done
|
||||
@ -141,7 +141,12 @@ if [ $(id -u) -eq 0 ]
|
||||
then
|
||||
PS1="${x}${RED}\${?}|\w\\$ ${RESET}${x}"
|
||||
else
|
||||
PS1="${x}${GREY}\${?}|\w\$(gitstatus)\\$ ${RESET}${x}"
|
||||
if command -v git > /dev/null
|
||||
then
|
||||
PS1="${x}${GREY}\${?}|\w\$(gitstatus)\\$ ${RESET}${x}"
|
||||
else
|
||||
PS1="${x}${GREY}\${?}|\w\\$ ${RESET}${x}"
|
||||
fi
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user