This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function echo_color() { | |
local colors=(black red green yellow blue magenta cyan white brightblack brightred brightgreen brightyellow brightblue brightmagenta brightcyan brightwhite) | |
local fg="\e[38;5;" bg="\e[48;5;" rs="\e[0m" | |
local color=$1; shift | |
local n=$(printf %3d $color) n2="" | |
if [[ -n ${colors[$color]} ]]; then | |
n2=" $(printf %-13s ${colors[$color]})" | |
fi | |
for arg in "$@";do |