Skip to content

Commit

Permalink
feat: detect bat on a wider variety of systems
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cljoly committed Oct 16, 2022
1 parent 8a2e99e commit 2b4ad95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/repo/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2b4ad95

Please sign in to comment.