From 79eb823bbb9ff88f284ae055fe1de954df8bf2e0 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Mon, 9 Mar 2026 22:30:14 -0400 Subject: [PATCH] fixed --- prompt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prompt b/prompt index 84f97b1..b5afc1d 100644 --- a/prompt +++ b/prompt @@ -123,8 +123,12 @@ _set_prompt() { [ -z "$cached" ] && cached="${_dir_cache[$PWD]}" IFS='|' read -r _git_root _superproject _ <<< "$cached" - # Get branch (can change without cd) - _read_branch + # Get branch (can change without cd) - if fails, git root is gone + if ! _read_branch; then + unset "_dir_cache[$PWD]" + _set_prompt + return + fi # Build paths using bash string ops (no readlink spawn) local git_curr_dir="${PWD#$_git_root}"