summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 38a5d9b..9881097 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -611,6 +611,11 @@ function make_entry.gen_from_apropos(opts)
return function(line)
local keyword, cmd, section, desc = line:match "^((.-)%s*%(([^)]+)%).-)%s+%-%s+(.*)$"
+ -- apropos might return alternatives for the cmd which are split on `,` and breaks everything else
+ -- for example on void linux it will return `alacritty, Alacritty` which will later result in
+ -- `man 1 alacritty, Alacritty`. So we just take the first one.
+ -- doing this outside of regex because of obvious reasons
+ cmd = vim.split(cmd, ",")[1]
return keyword
and sections[section]
and {