From 42194688ea5d501c4972123b2895ca5c308d05f6 Mon Sep 17 00:00:00 2001 From: allen-munsch Date: Tue, 5 May 2026 21:13:10 -0500 Subject: [PATCH] fix: else branch missing for when cd is aliased e.g. oh-my-bash Signed-off-by: allen-munsch --- scripts/env/cd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/env/cd b/scripts/env/cd index ea1d1953..c433e5c7 100644 --- a/scripts/env/cd +++ b/scripts/env/cd @@ -20,6 +20,9 @@ if __gvm_is_function cd; then eval "$(echo "__gvm_oldcd()"; declare -f cd | sed '1 s/{/\'$'\n''{/' | tail -n +2)" elif [[ "$(builtin type cd)" == "cd is a shell builtin" ]]; then eval "$(echo "__gvm_oldcd() { builtin cd \$*; return \$?; }")" +else + # cd is aliased (e.g. by oh-my-bash) — fall back to builtin cd + eval "$(echo "__gvm_oldcd() { builtin cd \$*; return \$?; }")" fi # Path cleanup