Add section on reset code
This commit is contained in:
parent
c9c1a7e714
commit
6d99cb9453
|
@ -117,7 +117,9 @@ section_notes_on_names() {
|
||||||
section_reset() {
|
section_reset() {
|
||||||
title "Code 0; Reset"
|
title "Code 0; Reset"
|
||||||
|
|
||||||
printf 'TODO\n'
|
printf "The SGR code \"0\" means \"reset\". This will restore all previously set colors and styles to the terminal's default values.\n"
|
||||||
|
printf "This is used often to end a section of styling, because codes continue indefinitely after they've been set.\n"
|
||||||
|
printf "For example, if you use \e[32m\\\e[32m to set the text to green, then that style will persist until the color is either changed again with another foreground color code, or reset with \e[0m\\\e[0m.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
section_bold_colors() {
|
section_bold_colors() {
|
||||||
|
@ -245,8 +247,6 @@ main() {
|
||||||
section_credits
|
section_credits
|
||||||
newline
|
newline
|
||||||
|
|
||||||
#printf 'Use \\e (or \\033) followed by the control sequence specified next to activate that color.\n'
|
|
||||||
#printf 'Use the reset sequence "[0m" to remove all set colors and styles.\n'
|
|
||||||
#printf 'When using these sequences in a Bash prompt (e.g. $PS1), be sure to surround the whole escape sequence with escaped brackets to prevent issues with Bash miscounting the number of characters in a line. For example: `export PS1=''\[\\e[36m\]\u@\h \$\[\\e[0m\]''` would create a cyan-colored prompt string.\n'
|
#printf 'When using these sequences in a Bash prompt (e.g. $PS1), be sure to surround the whole escape sequence with escaped brackets to prevent issues with Bash miscounting the number of characters in a line. For example: `export PS1=''\[\\e[36m\]\u@\h \$\[\\e[0m\]''` would create a cyan-colored prompt string.\n'
|
||||||
#printf '\n'
|
#printf '\n'
|
||||||
#
|
#
|
||||||
|
@ -262,10 +262,6 @@ main() {
|
||||||
#printf '\e[37m[37m Light grey\e[0m \e[47m[47m Light grey\e[0m\n'
|
#printf '\e[37m[37m Light grey\e[0m \e[47m[47m Light grey\e[0m\n'
|
||||||
#printf '\n'
|
#printf '\n'
|
||||||
|
|
||||||
#printf '\e[4;37m\e[1;37mExtra Attributes\e[0m\n'
|
|
||||||
#printf 'Extra attributes can be given by placing a numeric value (representing the attribute) followed by a '';'' after the ''['' character.\n'
|
|
||||||
#printf '\n'
|
|
||||||
|
|
||||||
#printf '\e[4;37m\e[1;37m1; (Boldness)\e[0m\n'
|
#printf '\e[4;37m\e[1;37m1; (Boldness)\e[0m\n'
|
||||||
#printf 'Note that some terminals use the "bold" attribute to display an alternate version of the color, e.g. a lighter or darker shade.\n'
|
#printf 'Note that some terminals use the "bold" attribute to display an alternate version of the color, e.g. a lighter or darker shade.\n'
|
||||||
#printf 'The canonical names for these alternate colors are what is displayed below.\n'
|
#printf 'The canonical names for these alternate colors are what is displayed below.\n'
|
||||||
|
|
Loading…
Reference in New Issue