From 92d44f90feb5675e2ed2f48974e5582d58bb0274 Mon Sep 17 00:00:00 2001 From: Pheon-Dev Date: Tue, 15 Nov 2022 01:32:56 +0300 Subject: [PATCH] add: colours --- zap.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zap.zsh b/zap.zsh index 53c1d58..5362950 100644 --- a/zap.zsh +++ b/zap.zsh @@ -80,22 +80,24 @@ _zap_update() { LOCAL=$(git rev-parse @) REMOTE=$(git rev-parse "$UPSTREAM") BASE=$(git merge-base @ "$UPSTREAM") - if [ $LOCAL = $REMOTE ]; then - echo -e "... up to date" + state=$(echo -e " ... up to date") + echo -e "\e[32m${state}\e[0m" elif [ $LOCAL = $BASE ]; then - echo -e "... new changes found, update." + state=$(echo -e " ... new changes found, update. \n") + echo -e "\e[31m${state}\e[0m" fi cd "$ZAP_PLUGIN_DIR" } plugins=$(ls "$HOME/.local/share/zap/plugins" | awk 'BEGIN { FS = "\n" } { print " " int((NR)) echo " 🔌 " $1 }') pwd=$(pwd) cd "$ZAP_DIR" - echo " 0 ⚡ Zap" | grep -E "Zap" + echo " 0 ⚡ Zap" _changes for plug in *; do cd $plug - echo -n $plugins | grep "$plug$" + show=$(echo -n $plugins | grep "$plug$") + echo -e "$show" _changes done echo -n "🔌 Plugin Number | (a) All Plugins | (0) ⚡ Zap Itself: "