diff --git a/termenv/style.scm b/termenv/style.scm index 5e3c32a..91c8851 100644 --- a/termenv/style.scm +++ b/termenv/style.scm @@ -13,7 +13,7 @@ underline overline blink - reverse + invert cross-out)) (define %RESET "0") @@ -85,7 +85,7 @@ (define (underline . s) (cons-seq s %UNDERLINE)) (define (overline . s) (cons-seq s %OVERLINE)) (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 (foreground c . s) (cons-seq s (make-foreground c))) (define (background c . s) (cons-seq s (make-background c))) diff --git a/termenv/unix.scm b/termenv/unix.scm index dae586e..98a0e92 100644 --- a/termenv/unix.scm +++ b/termenv/unix.scm @@ -1,20 +1,19 @@ (define-module (termenv unix) - #:use-module (srfi srfi-98) #:export (color-profile)) (define (color-profile port) "Get the best color profile supported by the given output port" (cond ((not (isatty? port)) 'ascii) - ((equal? "true" (get-environment-variable "GOOGLE_CLOUD_SHELL")) 'true-color) - (else (let ((term (or (get-environment-variable "TERM") "")) - (color-term (or (get-environment-variable "COLORTERM") ""))) + ((equal? "true" (getenv "GOOGLE_CLOUD_SHELL")) 'true-color) + (else (let ((term (or (getenv "TERM") "")) + (color-term (or (getenv "COLORTERM") ""))) (cond ((or (string-ci=? color-term "24bit") (string-ci=? color-term "truecolor")) ;; tmux supports TrueColor, screen only ANSI256 (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 'true-color)) ((or (string-ci=? color-term "yes") diff --git a/tests/test-screen.scm b/tests/test-screen.scm index ba870cc..53bb5a1 100644 --- a/tests/test-screen.scm +++ b/tests/test-screen.scm @@ -2,9 +2,7 @@ #:use-module (termenv screen) #:use-module (tests utils) #:use-module (srfi srfi-64) - #:use-module (rnrs io ports) - #:use-module (scheme base) - #:use-module (ice-9 textual-ports)) + #:use-module (rnrs io ports)) (test-begin "test-screen") @@ -12,5 +10,4 @@ "\x1b[0m" (reset (current-output-port))) - (test-end "test-screen") diff --git a/tests/test-style.scm b/tests/test-style.scm index 870b573..46a8d5e 100644 --- a/tests/test-style.scm +++ b/tests/test-style.scm @@ -2,9 +2,7 @@ #:use-module (termenv style) #:use-module (tests utils) #:use-module (srfi srfi-64) - #:use-module (rnrs io ports) - #:use-module (scheme base) - #:use-module (ice-9 textual-ports)) + #:use-module (rnrs io ports)) (test-begin "test-style")