summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
authorJINNOUCHI Yasushi <me@delphinus.dev>2021-02-08 17:52:33 +0900
committerGitHub <noreply@github.com>2021-02-08 09:52:33 +0100
commitb3d3d938696a533c199031418e0da553a8424a46 (patch)
tree187c58aeaa95a24694053a4cf7b80286742880ef /lua/telescope/make_entry.lua
parent5f1d16acf6716261bd52466733e096a49b9eadad (diff)
feat: show all sections in man_pages (#512)
:Telescope sections=ALL
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index b0d8060..d6059af 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -615,8 +615,14 @@ end
function make_entry.gen_from_apropos(opts)
local sections = {}
- for _, section in ipairs(opts.sections) do
- sections[section] = true
+ if #opts.sections == 1 and opts.sections[1] == 'ALL' then
+ setmetatable(sections, {
+ __index = function() return true end,
+ })
+ else
+ for _, section in ipairs(opts.sections) do
+ sections[section] = true
+ end
end
local displayer = entry_display.create {