From c9d0d14d198dd8f081892ed2696adfa3c09df3ee Mon Sep 17 00:00:00 2001 From: Bart Dabek Date: Wed, 19 Jun 2024 13:21:32 -0400 Subject: [PATCH] Installation work... wip --- util/set_theme_and_plugins.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/util/set_theme_and_plugins.sh b/util/set_theme_and_plugins.sh index 3c9e64b..333975f 100755 --- a/util/set_theme_and_plugins.sh +++ b/util/set_theme_and_plugins.sh @@ -27,14 +27,15 @@ set_oh_my_zsh_theme_and_plugins() { esac # Set the theme in .zshrc - if grep -q "^ZSH_THEME=" ~/.zshrc; then - sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$ZSH_THEME\"/" ~/.zshrc - else - echo "ZSH_THEME=\"$ZSH_THEME\"" >> ~/.zshrc - fi + if grep -q "^ZSH_THEME=" ~/.zshrc; then + sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$ZSH_THEME\"/" ~/.zshrc + else + echo "ZSH_THEME=\"$ZSH_THEME\"" >>~/.zshrc + fi - # Add plugins to .zshrc before sourcing oh-my-zsh - sed -i.bak '/^source $ZSH\/oh-my-zsh.sh/i plugins=(git zsh-autosuggestions zsh-syntax-highlighting)' ~/.zshrc + echo "plugins=(git zsh-autosuggestions zsh-syntax-highlighting)" >>~/.zshrc echo "Theme set to $theme and plugins configured." + + cat ~/.zshrc }