Move sections to distinct functions

This commit is contained in:
The Magician 2023-11-04 22:18:38 +00:00
parent 9fc0520580
commit 6e0e47098c
1 changed files with 12 additions and 6 deletions

View File

@ -34,10 +34,7 @@ title() {
printf '\e[0m\n'
}
main() {
thebookofcolors
newline 2
section_introduction() {
title "Introduction"
thebookofcolors
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 '
thebookofcolors "The Book"
printf ' itself.\n'
}
newline
section_disclaimers() {
title "Disclaimers"
thebookofcolors
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 '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'
}
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 the reset sequence "[0m" to remove all set colors and styles.\n'