From f65bfc52695607f179fbf70331b4028b40616642 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 28 Jan 2025 19:04:25 +0100 Subject: fix git prompt for new repositories --- .zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 35b89f1..4ba1181 100644 --- a/.zshrc +++ b/.zshrc @@ -41,7 +41,7 @@ prompt_segment() { } prompt_mod_git_info() { git rev-parse --is-inside-work-tree 1> /dev/null 2> /dev/null || return - prompt_segment "git $(git rev-parse --abbrev-ref HEAD)" + prompt_segment "git $(git rev-parse --abbrev-ref HEAD 2> /dev/null)" } # only display hostname in prompt if connected over SSH [ -n "$SSH_CLIENT" ] && PROMPT+="$(prompt_segment '%m')" -- cgit v1.2.3