Let the prompt survive not being installed yet
oh-my-posh moved from a curl installer to a Fedora package, and the shell config invoked it unconditionally. That is fine during a full install, where install-packages runs before the bashrc is linked -- and not fine in every other order: a stage re-run by hand, an install that failed partway, or the moment between removing the old binary and installing the package. Same guard as the nvm source above it. An unthemed prompt is a worse shell; one printing command-not-found before every prompt is a machine that looks broken. Claude-Session: https://claude.ai/code/session_01Q84axqUE5inJhf5Jz9CFy1
This commit is contained in:
+8
-1
@@ -43,4 +43,11 @@ fi
|
||||
eval "$(zoxide init bash)"
|
||||
|
||||
# Oh My Posh
|
||||
eval "$(oh-my-posh init bash --config $PANAMA_PATH/config/dot/ohmyposh/gib.omp.json)"
|
||||
# Guarded for the same reason the nvm source above is: oh-my-posh is a package,
|
||||
# and a shell opened before it is installed -- a stage re-run by hand, an
|
||||
# install that failed partway -- would otherwise print command-not-found on
|
||||
# every prompt. An unthemed prompt is a worse shell; an erroring one is a
|
||||
# broken-looking machine.
|
||||
if command -v oh-my-posh >/dev/null 2>&1; then
|
||||
eval "$(oh-my-posh init bash --config "$PANAMA_PATH/config/dot/ohmyposh/gib.omp.json")"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user