summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLeiser Fernández Gallo <leiserfg@gmail.com>2018-11-30 11:28:33 +0100
committerGitHub <noreply@github.com>2018-11-30 11:28:33 +0100
commit1fded77e8d2cfe7d7e1d1a41677708dd8f67da56 (patch)
treec095788634fa7a09500a8a9a6a295281acac8095
parentbae44ae3c7440c00acf65ba4c26a0fd2a0f78c3a (diff)
downloadranger-1fded77e8d2cfe7d7e1d1a41677708dd8f67da56.tar.gz
Add bat support for code highlighting
-rwxr-xr-xranger/data/scope.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 8e0a0f6d..64f55a12 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -186,6 +186,9 @@ handle_mime() {
             fi
             highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
                 --style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
+                
+            # env COLORTERM=$pygmentize_format  bat --color=always  --style="plain"  "${FILE_PATH}" && exit 5
+
             # pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
             exit 2;;