From 5bbbd60cfc00ed97b29efd3464f83780241be810 Mon Sep 17 00:00:00 2001 From: emma Date: Mon, 28 Aug 2023 15:43:44 -0600 Subject: [PATCH] make bat(1) use terminal colors --- en | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/en b/en index 99e3ff2..88ed0f7 100755 --- a/en +++ b/en @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright (c) 2023 Emma Tebibyte +# Copyright (c) 2023 Emma Tebibyte # SPDX-License-Identifier: FSFAP # # Copying and distribution of this file, with or without modification, are @@ -45,6 +45,8 @@ while test -n "$1"; do # use bat for syntax highlighting if it’s available, but remove the frills if command -v bat >/dev/null then + # make bat use terminal theme + BAT_THEME=ansi; export BAT_THEME # there has to be a temp file for writing the highlighted text to syntax_h() { printf "%s\n" "$1" >"$temp_highlight"