Skip git prompt

This commit is contained in:
Thomas Forgione 2024-11-22 22:27:06 +01:00
parent 27753a09a8
commit d03b5e7e25
1 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,16 @@ else
fi
git_prompt_info_no_space() {
current="$PWD"
while [ "$PWD" != "/" ] && [ ! -d "$PWD/.git" ]; do
cd ..
done
if [ -f "$PWD/.gitskipprompt" ]; then
return
fi
cd "$current"
local info=$(git_prompt_info)
if [ ! -z $info ]; then
echo " $info"