From 377cb77ccec7dd41f8644a276f7f119573591f78 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 3 Jul 2022 11:52:10 -0500 Subject: [PATCH] only load oh-my-posh and mcfly if the commands are present --- zsh/.zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 6b72be2..c4e46ac 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -22,6 +22,10 @@ if [ -f $HOME/.zshalias ]; then fi # Shell initializations -eval "$(oh-my-posh init zsh --config 'https://raw.githubusercontent.com/jbowdre/dotfiles/main/oh-my-posh/vpotato.minimal.omp.json')" -enable_poshtransientprompt -eval "$(mcfly init zsh)" +if [ $(which oh-my-posh) ]; then + eval "$(oh-my-posh init zsh --config 'https://raw.githubusercontent.com/jbowdre/dotfiles/main/oh-my-posh/vpotato.minimal.omp.json')" + enable_poshtransientprompt +fi +if [ $(which mcfly) ]; then + eval "$(mcfly init zsh)" +fi