feat: check if cmd extension can be loaded (#2655)
As a last resort if no other cmd is found in `run_cmd`, check if the command can be loaded as an extension.
This commit is contained in:
@@ -194,6 +194,12 @@ local function run_command(args)
|
||||
return
|
||||
end
|
||||
|
||||
local ok = pcall(require("telescope").load_extension, cmd)
|
||||
if ok then
|
||||
extensions[cmd][cmd](opts)
|
||||
return
|
||||
end
|
||||
|
||||
utils.notify("run_command", {
|
||||
msg = "Unknown command",
|
||||
level = "ERROR",
|
||||
|
||||
Reference in New Issue
Block a user