zsh: fix `color` function

pull/6/head
bretello 2022-03-26 13:07:16 +01:00
parent 2841fada0a
commit 9b6494c94d
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 2 additions and 4 deletions

View File

@ -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}"
}