|
@@ -1,26 +1,68 @@
|
1
|
1
|
#!/bin/bash
|
2
|
2
|
|
3
|
3
|
# get some fancy colorz
|
4
|
|
- black="\[\033[0;30m\]"
|
5
|
|
- red="\[\033[0;31m\]"
|
6
|
|
- green="\[\033[0;32m\]"
|
7
|
|
- yellow="\[\033[0;33m\]"
|
8
|
|
- blue="\[\033[0;34m\]"
|
9
|
|
- magenta="\[\033[0;35m\]"
|
10
|
|
- cyan="\[\033[0;36m\]"
|
11
|
|
- white="\[\033[0;37m\]"
|
12
|
|
- lblack="\[\033[1;30m\]"
|
13
|
|
- lred="\[\033[1;31m\]"
|
14
|
|
- lgreen="\[\033[1;32m\]"
|
15
|
|
- lyellow="\[\033[1;33m\]"
|
16
|
|
- lblue="\[\033[1;34m\]"
|
17
|
|
- lmagenta="\[\033[1;35m\]"
|
18
|
|
- lcyan="\[\033[1;36m\]"
|
19
|
|
- lwhite="\[\033[1;37m\]"
|
20
|
|
- normal="\[\033[1;0m\]"
|
|
4
|
+BASHUM_COLOR_BLACK=$'\033[0;30m'
|
|
5
|
+BASHUM_COLOR_RED=$'\033[0;31m'
|
|
6
|
+BASHUM_COLOR_GREEN=$'\033[0;32m'
|
|
7
|
+BASHUM_COLOR_YELLOW=$'\033[0;33m'
|
|
8
|
+BASHUM_COLOR_BLUE=$'\033[0;34m'
|
|
9
|
+BASHUM_COLOR_MAGENTA=$'\033[0;35m'
|
|
10
|
+BASHUM_COLOR_CYAN=$'\033[0;36m'
|
|
11
|
+BASHUM_COLOR_WHITE=$'\033[0;37m'
|
|
12
|
+BASHUM_COLOR_LBLACK=$'\033[1;30m'
|
|
13
|
+BASHUM_COLOR_LRED=$'\033[1;31m'
|
|
14
|
+BASHUM_COLOR_LGREEN=$'\033[1;32m'
|
|
15
|
+BASHUM_COLOR_LYELLOW=$'\033[1;33m'
|
|
16
|
+BASHUM_COLOR_LBLUE=$'\033[1;34m'
|
|
17
|
+BASHUM_COLOR_LMAGENTA=$'\033[1;35m'
|
|
18
|
+BASHUM_COLOR_LCYAN=$'\033[1;36m'
|
|
19
|
+BASHUM_COLOR_LWHITE=$'\033[1;37m'
|
|
20
|
+BASHUM_COLOR_NORMAL=$'\033[1;0m'
|
21
|
21
|
|
22
|
|
-coldemo="colors demo: \n$black black$red red$green green$yellow yellow"
|
23
|
|
-coldemo="${coldemo}$blue blue$magenta magenta$cyan cyan$white white\n "
|
24
|
|
-coldemo="${coldemo}$lblack lblack$lred lred$lgreen lgreen$lyellow lyellow"
|
25
|
|
-coldemo="${coldemo}$lblue lblue$lmagenta lmagenta$lcyan lcyan$lwhite lwhite\n"
|
26
|
|
-coldemo="${coldemo}$normal normal\n"
|
|
22
|
+# get some fancy colorz
|
|
23
|
+BASHUM_PS_COLOR_BLACK=$'\[\033[0;30m\]'
|
|
24
|
+BASHUM_PS_COLOR_RED=$'\[\033[0;31m\]'
|
|
25
|
+BASHUM_PS_COLOR_GREEN=$'\[\033[0;32m\]'
|
|
26
|
+BASHUM_PS_COLOR_YELLOW=$'\[\033[0;33m\]'
|
|
27
|
+BASHUM_PS_COLOR_BLUE=$'\[\033[0;34m\]'
|
|
28
|
+BASHUM_PS_COLOR_MAGENTA=$'\[\033[0;35m\]'
|
|
29
|
+BASHUM_PS_COLOR_CYAN=$'\[\033[0;36m\]'
|
|
30
|
+BASHUM_PS_COLOR_WHITE=$'\[\033[0;37m\]'
|
|
31
|
+BASHUM_PS_COLOR_LBLACK=$'\[\033[1;30m\]'
|
|
32
|
+BASHUM_PS_COLOR_LRED=$'\[\033[1;31m\]'
|
|
33
|
+BASHUM_PS_COLOR_LGREEN=$'\[\033[1;32m\]'
|
|
34
|
+BASHUM_PS_COLOR_LYELLOW=$'\[\033[1;33m\]'
|
|
35
|
+BASHUM_PS_COLOR_LBLUE=$'\[\033[1;34m\]'
|
|
36
|
+BASHUM_PS_COLOR_LMAGENTA=$'\[\033[1;35m\]'
|
|
37
|
+BASHUM_PS_COLOR_LCYAN=$'\[\033[1;36m\]'
|
|
38
|
+BASHUM_PS_COLOR_LWHITE=$'\[\033[1;37m\]'
|
|
39
|
+BASHUM_PS_COLOR_NORMAL=$'\[\033[1;0m\]'
|
|
40
|
+
|
|
41
|
+#shellcheck disable=SC1087
|
|
42
|
+bashum__colordemo() {
|
|
43
|
+ local bla=$BASHUM_COLOR_BLACK
|
|
44
|
+ local red=$BASHUM_COLOR_RED
|
|
45
|
+ local gre=$BASHUM_COLOR_GREEN
|
|
46
|
+ local yel=$BASHUM_COLOR_YELLOW
|
|
47
|
+ local blu=$BASHUM_COLOR_BLUE
|
|
48
|
+ local mag=$BASHUM_COLOR_MAGENTA
|
|
49
|
+ local cya=$BASHUM_COLOR_CYAN
|
|
50
|
+ local whi=$BASHUM_COLOR_WHITE
|
|
51
|
+ local lbla=$BASHUM_COLOR_LBLACK
|
|
52
|
+ local lred=$BASHUM_COLOR_LRED
|
|
53
|
+ local lgre=$BASHUM_COLOR_LGREEN
|
|
54
|
+ local lyel=$BASHUM_COLOR_LYELLOW
|
|
55
|
+ local lblu=$BASHUM_COLOR_LBLUE
|
|
56
|
+ local lmag=$BASHUM_COLOR_LMAGENTA
|
|
57
|
+ local lcya=$BASHUM_COLOR_LCYAN
|
|
58
|
+ local lwhi=$BASHUM_COLOR_LWHITE
|
|
59
|
+ local n=$BASHUM_COLOR_NORMAL
|
|
60
|
+ echo "black: $bla[abc123]$n lblack: $lbla[abc123]$n"
|
|
61
|
+ echo "red: $red[abc123]$n lred: $lred[abc123]$n"
|
|
62
|
+ echo "yellow: $yel[abc123]$n lyellow: $lyel[abc123]$n"
|
|
63
|
+ echo "green: $gre[abc123]$n lgreen: $lgre[abc123]$n"
|
|
64
|
+ echo "cyan: $cya[abc123]$n lcyan: $lcya[abc123]$n"
|
|
65
|
+ echo "blue: $blu[abc123]$n lblue: $lblu[abc123]$n"
|
|
66
|
+ echo "magenta: $mag[abc123]$n lmagenta: $lmag[abc123]$n"
|
|
67
|
+ echo "white: $whi[abc123]$n lwhite: $lwhi[abc123]$n"
|
|
68
|
+}
|