From 15a1207ccab88032dfb438032a7ad5ad29128ede Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 6 Nov 2023 10:57:46 +0000 Subject: [PATCH] Fix display of escaped escape codes --- thebookofcolors | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/thebookofcolors b/thebookofcolors index 806088c..2c6f579 100755 --- a/thebookofcolors +++ b/thebookofcolors @@ -86,14 +86,14 @@ section_regular_colors() { printf "These colors and their respective escape codes are shown in the following table:\n" newline - printf "\e[30m\\e[30;47mBlack\e[0m (shown on light grey background to aid visibility)\n" - printf "\e[31m\\e[31mRed\e[0m\n" - printf "\e[32m\\e[32mGreen\e[0m\n" - printf "\e[33m\\e[33mBrown\e[0m\n" - printf "\e[34m\\e[34mBlue\e[0m\n" - printf "\e[35m\\e[35mPurple\e[0m\n" - printf "\e[36m\\e[36mCyan\e[0m\n" - printf "\e[37m\\e[37;40mLight grey (shown on black background to aid visibility)\e[0m\n" + printf "\e[30;47m\\\e[30m Black\e[0m (shown on light grey background to aid visibility)\n" + printf "\e[31m\\\e[31m Red\e[0m\n" + printf "\e[32m\\\e[32m Green\e[0m\n" + printf "\e[33m\\\e[33m Brown\e[0m\n" + printf "\e[34m\\\e[34m Blue\e[0m\n" + printf "\e[35m\\\e[35m Purple\e[0m\n" + printf "\e[36m\\\e[36m Cyan\e[0m\n" + printf "\e[37m\\\e[37;40m Light grey (shown on black background to aid visibility)\e[0m\n" } section_notes_on_names() { @@ -129,14 +129,14 @@ section_bold_colors() { printf "The result of using this attribute is highly implementation-dependent -- depending on the terminal used, this can either change the color to a \"bright\" version of the standard color, change the font face to bold, or both.\n" printf "Here is a table of the colors with the boldness attribute enabled, along with their alternate names:\n" - printf "\e[1;30m\\\e[1;30m Dark grey\e[0m\n" + printf "\e[1;30;47m\\\e[1;30m Dark grey\e[0m (shown on light grey)\n" printf "\e[1;31m\\\e[1;31m Light red\e[0m\n" printf "\e[1;32m\\\e[1;32m Light green\e[0m\n" printf "\e[1;33m\\\e[1;33m Yellow\e[0m\n" printf "\e[1;34m\\\e[1;34m Light blue\e[0m\n" printf "\e[1;35m\\\e[1;35m Light purple\e[0m\n" printf "\e[1;36m\\\e[1;36m Light cyan\e[0m\n" - printf "\e[1;37m\\\e[1;37m White\e[0m\n" + printf "\e[1;37;40m\\\e[1;37m White (shown on black)\e[0m\n" } section_background_colors() {