Big bang
This commit is contained in:
20
lib/colors.sh
Normal file
20
lib/colors.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Terminal color and formatting constants.
|
||||
# Source this file; do not execute it directly.
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
CYAN='\033[0;36m'
|
||||
BOLD='\033[1m'
|
||||
DIM='\033[2m'
|
||||
NC='\033[0m' # No Color / Reset
|
||||
|
||||
# Print a colored message to stderr
|
||||
# Usage: color_echo <color_var> <message>
|
||||
color_echo() {
|
||||
local color="$1"
|
||||
local msg="$2"
|
||||
printf "${color}%s${NC}\n" "$msg" >&2
|
||||
}
|
||||
Reference in New Issue
Block a user