Move sections to distinct functions
This commit is contained in:
parent
9fc0520580
commit
6e0e47098c
|
@ -34,10 +34,7 @@ title() {
|
||||||
printf '\e[0m\n'
|
printf '\e[0m\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
section_introduction() {
|
||||||
thebookofcolors
|
|
||||||
newline 2
|
|
||||||
|
|
||||||
title "Introduction"
|
title "Introduction"
|
||||||
thebookofcolors
|
thebookofcolors
|
||||||
printf ' is an in-terminal manual on ANSI escape codes, or "color codes", for use in terminal emulators.\n'
|
printf ' is an in-terminal manual on ANSI escape codes, or "color codes", for use in terminal emulators.\n'
|
||||||
|
@ -46,9 +43,9 @@ main() {
|
||||||
printf ' is used in '
|
printf ' is used in '
|
||||||
thebookofcolors "The Book"
|
thebookofcolors "The Book"
|
||||||
printf ' itself.\n'
|
printf ' itself.\n'
|
||||||
|
}
|
||||||
|
|
||||||
newline
|
section_disclaimers() {
|
||||||
|
|
||||||
title "Disclaimers"
|
title "Disclaimers"
|
||||||
thebookofcolors
|
thebookofcolors
|
||||||
printf ' is open-source software and is provided as-is with NO WARRANTY under applicable law.\n'
|
printf ' is open-source software and is provided as-is with NO WARRANTY under applicable law.\n'
|
||||||
|
@ -57,7 +54,16 @@ main() {
|
||||||
printf ', use the `reset` command to restore your terminal.\n'
|
printf ', use the `reset` command to restore your terminal.\n'
|
||||||
printf 'If you believe you have found a bug, please open an issue on the repository, which can be found at <REPOSITORY_URL_GOES_HERE>.\n'
|
printf 'If you believe you have found a bug, please open an issue on the repository, which can be found at <REPOSITORY_URL_GOES_HERE>.\n'
|
||||||
printf 'If you have a fix for said bug, please submit a pull request instead.\n'
|
printf 'If you have a fix for said bug, please submit a pull request instead.\n'
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
thebookofcolors
|
||||||
|
newline 2
|
||||||
|
|
||||||
|
section_introduction
|
||||||
|
newline
|
||||||
|
|
||||||
|
section_disclaimers
|
||||||
|
|
||||||
#printf 'Use \\e (or \\033) followed by the control sequence specified next to activate that color.\n'
|
#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 'Use the reset sequence "[0m" to remove all set colors and styles.\n'
|
||||||
|
|
Loading…
Reference in New Issue