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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ok = pcall(require("telescope").load_extension, cmd)
|
||||||
|
if ok then
|
||||||
|
extensions[cmd][cmd](opts)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
utils.notify("run_command", {
|
utils.notify("run_command", {
|
||||||
msg = "Unknown command",
|
msg = "Unknown command",
|
||||||
level = "ERROR",
|
level = "ERROR",
|
||||||
|
|||||||
Reference in New Issue
Block a user