From d03b5e7e25df11c7c7712f57031ec5e133ba1b83 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 22 Nov 2024 22:27:06 +0100 Subject: [PATCH] Skip git prompt --- zsh/ohmyzsh/themes/tforgione.zsh-theme | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zsh/ohmyzsh/themes/tforgione.zsh-theme b/zsh/ohmyzsh/themes/tforgione.zsh-theme index c91a166..20c412e 100644 --- a/zsh/ohmyzsh/themes/tforgione.zsh-theme +++ b/zsh/ohmyzsh/themes/tforgione.zsh-theme @@ -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"