Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/env/cd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down