Skip to content

Commit

Permalink
colors added, issue iiitl#9
Browse files Browse the repository at this point in the history
  • Loading branch information
Karanagarwal12 committed Mar 15, 2024
1 parent 96850b2 commit 69fed59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/color
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ color() {
declare -A color_mapping=(
# TODO: Add more color values
# Refer bash color codes
['black']=30
['red']=31
['green']=32
['yellow']=33
['blue']=34
['magenta']=35
['cyan']=36
['white']=37
)

if [[ $1 == 'reset' ]]; then
color 0 00
else
color 1 ${color_mapping[$1]}
fi

0 comments on commit 69fed59

Please sign in to comment.