From 9b6494c94d568fff3213868ea2692c09291bb171 Mon Sep 17 00:00:00 2001 From: bretello Date: Sat, 26 Mar 2022 13:07:16 +0100 Subject: [PATCH] zsh: fix `color` function --- functions.zsh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions.zsh b/functions.zsh index 2c79dd6..ac0e9c6 100755 --- a/functions.zsh +++ b/functions.zsh @@ -50,14 +50,12 @@ function ppath echo "$PWD/$1" } -## Color string with given color. Usage: color $colorname "string", available colors in colors.sh +## Color string with given color. Usage: `color $NAME "string"`, available colors in `colors.sh` function color { color=$1 - set -x shift 1 - echo -e "$"$color"$@${CLEAR}\n" - set +x + echo -e "${color}$@${CLEAR}" }