diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-07-07 16:45:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-07 16:45:32 +0200 |
| commit | 9b3afe51c49a77b73d21af16dec322afa111e2cd (patch) | |
| tree | f83d4415f381780ff129e0ed158a591d96214ea6 /lua/telescope/make_entry.lua | |
| parent | f838695459d75a889ae8d96e370957f0f675902a (diff) | |
fix: autocmd, show desc if available (#2046)
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 805218e..b567237 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -1177,12 +1177,16 @@ function make_entry.gen_from_autocommands(opts) return function(entry) local group_name = vim.F.if_nil(entry.group_name, "<anonymous>") + local command = entry.command + if entry.desc and vim.startswith(command, "<lua: ") then + command = entry.desc + end return make_entry.set_default_entry_mt({ value = { event = entry.event, group_name = group_name, pattern = entry.pattern, - command = entry.command, + command = command, }, -- ordinal = entry.event .. " " .. group_name .. " " .. entry.pattern .. " " .. entry.command, |
