preserve-cwd

This commit is contained in:
Thomas Forgione 2024-12-17 16:41:46 +01:00
parent d03b5e7e25
commit facaccc381
1 changed files with 2 additions and 2 deletions

View File

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