]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Fix using batcat if it exists
authorb3nj4m1n <b3nj4m1n@gmx.net>
Tue, 28 Jun 2022 10:05:48 +0000 (12:05 +0200)
committerb3nj4m1n <b3nj4m1n@gmx.net>
Tue, 28 Jun 2022 10:05:48 +0000 (12:05 +0200)
xdg-ninja.sh

index 2005e21234781db97bdcdf0c2267bc07a3baee3d..6d7a0ad3691f7d6114177da5dcaf9b38eb95eb71 100755 (executable)
@@ -9,6 +9,9 @@ auto_set_decoder() {
     DECODER="cat"
     if has_command glow; then
         DECODER="glow -"
     DECODER="cat"
     if has_command glow; then
         DECODER="glow -"
+    elif has_command batcat; then
+        DECODER="batcat -pp --decorations=always --color=always --language markdown"
+        printf "Markdown rendering will be done by bat. (Glow is recommended)\n"
     elif has_command bat; then
         DECODER="bat -pp --decorations=always --color=always --language markdown"
         printf "Markdown rendering will be done by bat. (Glow is recommended)\n"
     elif has_command bat; then
         DECODER="bat -pp --decorations=always --color=always --language markdown"
         printf "Markdown rendering will be done by bat. (Glow is recommended)\n"