summaryrefslogtreecommitdiff
path: root/gnbug
diff options
context:
space:
mode:
authorArun Isaac2021-09-26 22:34:23 +0530
committerArun Isaac2021-09-26 22:34:23 +0530
commit039f5f7282e83d6ff1100e994b05c505f537fde8 (patch)
tree25ce4322d9c7db0428bc1575cbdcfc5c5dd4dc58 /gnbug
parent40714ddc779547dcee8d45e983da2429adc156ef (diff)
downloadgn-gemtext-039f5f7282e83d6ff1100e994b05c505f537fde8.tar.gz
gnbug: Organize color codes.
Create functions for all 3 bit colors (except black and white), both foreground and background. * gnbug (yellow, red-background, green-background, yellow-background, blue-background, magenta-background, cyan-background): New functions. (magenta): Move function below the blue function.
Diffstat (limited to 'gnbug')
-rwxr-xr-xgnbug14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnbug b/gnbug
index b722b9e..becc39f 100755
--- a/gnbug
+++ b/gnbug
@@ -218,6 +218,10 @@ there is no such commit."
port))
"git" "log" "--format=format:%H" "--since" since))
+;;;
+;;; 3 bit colors using ANSI escape codes
+;;;
+
(define (color code str)
"Return STR within ANSI escape CODE, thus rendering it in color in a
terminal."
@@ -225,10 +229,18 @@ terminal."
(define red (cut color 31 <>))
(define green (cut color 32 <>))
-(define magenta (cut color 35 <>))
+(define yellow (cut color 33 <>))
(define blue (cut color 34 <>))
+(define magenta (cut color 35 <>))
(define cyan (cut color 36 <>))
+(define red-background (cut color 41 <>))
+(define green-background (cut color 42 <>))
+(define yellow-background (cut color 43 <>))
+(define blue-background (cut color 44 <>))
+(define magenta-background (cut color 45 <>))
+(define cyan-background (cut color 46 <>))
+
(define (invalid-option name arg loads)
(error "Invalid option" name))