Fixes zoxide and compoletions.

This commit is contained in:
2026-09-07 18:57:53 -07:00
parent 23a42cda46
commit 2836313b2f
6 changed files with 112 additions and 21 deletions

View File

@@ -1,9 +1,16 @@
# Display fortune (with cowsay if available) in interactive shells
# Display fortune (with cowsay if available) in top-level interactive shells
# (new iTerm2 tabs/windows, xterm, console, VS Code / IntelliJ terminals).
# Subshells (e.g. typing 'bash' or 'zsh' inside an existing terminal) are skipped.
case $- in
*i*) ;;
*) return 0 2>/dev/null || exit 0 ;;
esac
# Skip nested subshells (SHLVL > 1)
if [ "${SHLVL:-1}" -gt 1 ]; then
return 0 2>/dev/null || exit 0
fi
_fortune_cmd=""
if command -v fortune >/dev/null 2>&1; then
_fortune_cmd="fortune"