Renamed "reverse" to "invert"
This commit is contained in:
parent
10489b1b08
commit
09083afe11
4 changed files with 8 additions and 14 deletions
|
@ -13,7 +13,7 @@
|
||||||
underline
|
underline
|
||||||
overline
|
overline
|
||||||
blink
|
blink
|
||||||
reverse
|
invert
|
||||||
cross-out))
|
cross-out))
|
||||||
|
|
||||||
(define %RESET "0")
|
(define %RESET "0")
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
(define (underline . s) (cons-seq s %UNDERLINE))
|
(define (underline . s) (cons-seq s %UNDERLINE))
|
||||||
(define (overline . s) (cons-seq s %OVERLINE))
|
(define (overline . s) (cons-seq s %OVERLINE))
|
||||||
(define (blink . s) (cons-seq s %BLINK))
|
(define (blink . s) (cons-seq s %BLINK))
|
||||||
(define (reverse . s) (cons-seq s %REVERSE))
|
(define (invert . s) (cons-seq s %REVERSE))
|
||||||
(define (cross-out . s) (cons-seq s %CROSS-OUT))
|
(define (cross-out . s) (cons-seq s %CROSS-OUT))
|
||||||
(define (foreground c . s) (cons-seq s (make-foreground c)))
|
(define (foreground c . s) (cons-seq s (make-foreground c)))
|
||||||
(define (background c . s) (cons-seq s (make-background c)))
|
(define (background c . s) (cons-seq s (make-background c)))
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
(define-module (termenv unix)
|
(define-module (termenv unix)
|
||||||
#:use-module (srfi srfi-98)
|
|
||||||
#:export (color-profile))
|
#:export (color-profile))
|
||||||
|
|
||||||
(define (color-profile port)
|
(define (color-profile port)
|
||||||
"Get the best color profile supported by the given output port"
|
"Get the best color profile supported by the given output port"
|
||||||
(cond
|
(cond
|
||||||
((not (isatty? port)) 'ascii)
|
((not (isatty? port)) 'ascii)
|
||||||
((equal? "true" (get-environment-variable "GOOGLE_CLOUD_SHELL")) 'true-color)
|
((equal? "true" (getenv "GOOGLE_CLOUD_SHELL")) 'true-color)
|
||||||
(else (let ((term (or (get-environment-variable "TERM") ""))
|
(else (let ((term (or (getenv "TERM") ""))
|
||||||
(color-term (or (get-environment-variable "COLORTERM") "")))
|
(color-term (or (getenv "COLORTERM") "")))
|
||||||
(cond
|
(cond
|
||||||
((or (string-ci=? color-term "24bit")
|
((or (string-ci=? color-term "24bit")
|
||||||
(string-ci=? color-term "truecolor"))
|
(string-ci=? color-term "truecolor"))
|
||||||
;; tmux supports TrueColor, screen only ANSI256
|
;; tmux supports TrueColor, screen only ANSI256
|
||||||
(if (and (string-prefix-ci? "screen" term)
|
(if (and (string-prefix-ci? "screen" term)
|
||||||
(not (string-ci=? "tmux" (or (get-environment-variable "TERM_PROGRAM") ""))))
|
(not (string-ci=? "tmux" (or (getenv "TERM_PROGRAM") ""))))
|
||||||
'ansi256
|
'ansi256
|
||||||
'true-color))
|
'true-color))
|
||||||
((or (string-ci=? color-term "yes")
|
((or (string-ci=? color-term "yes")
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
#:use-module (termenv screen)
|
#:use-module (termenv screen)
|
||||||
#:use-module (tests utils)
|
#:use-module (tests utils)
|
||||||
#:use-module (srfi srfi-64)
|
#:use-module (srfi srfi-64)
|
||||||
#:use-module (rnrs io ports)
|
#:use-module (rnrs io ports))
|
||||||
#:use-module (scheme base)
|
|
||||||
#:use-module (ice-9 textual-ports))
|
|
||||||
|
|
||||||
(test-begin "test-screen")
|
(test-begin "test-screen")
|
||||||
|
|
||||||
|
@ -12,5 +10,4 @@
|
||||||
"\x1b[0m"
|
"\x1b[0m"
|
||||||
(reset (current-output-port)))
|
(reset (current-output-port)))
|
||||||
|
|
||||||
|
|
||||||
(test-end "test-screen")
|
(test-end "test-screen")
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
#:use-module (termenv style)
|
#:use-module (termenv style)
|
||||||
#:use-module (tests utils)
|
#:use-module (tests utils)
|
||||||
#:use-module (srfi srfi-64)
|
#:use-module (srfi srfi-64)
|
||||||
#:use-module (rnrs io ports)
|
#:use-module (rnrs io ports))
|
||||||
#:use-module (scheme base)
|
|
||||||
#:use-module (ice-9 textual-ports))
|
|
||||||
|
|
||||||
(test-begin "test-style")
|
(test-begin "test-style")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue