From 2b4ad953d94dbbb9b9b4061020ea8215977309ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Joly?= Date: Sun, 16 Oct 2022 14:12:33 +0100 Subject: [PATCH] feat: detect bat on a wider variety of systems Some debian-based systems use put `bat` under `/usr/bin/batcat`. We thus need a to look for `batcat` as well. Fixes #47 [1]: https://packages.debian.org/bullseye/amd64/bat/filelist, https://web.archive.org/web/20221016131458/https://packages.debian.org/bullseye/amd64/bat/filelist --- lua/telescope/_extensions/repo/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/_extensions/repo/utils.lua b/lua/telescope/_extensions/repo/utils.lua index b91addf..4132112 100644 --- a/lua/telescope/_extensions/repo/utils.lua +++ b/lua/telescope/_extensions/repo/utils.lua @@ -22,7 +22,7 @@ M.find_locate_binary = function() return find_binary({ "plocate", "lolcate", "glocate", "locate" }) end -M._generic_previewer = { { "bat", "--style", "header,grid" }, { "cat" } } +M._generic_previewer = { { "bat", "--style", "header,grid" }, { "batcat", "--style", "header,grid" }, { "cat" } } M.find_generic_previewer_for_document = function(doc) local l = find_binary(M._generic_previewer)