Skip to content

Commit

Permalink
Merge pull request #27 from pysan3/export-lua-function
Browse files Browse the repository at this point in the history
feat: export `exec_command` to call directly from output
  • Loading branch information
max397574 authored Apr 26, 2023
2 parents f794370 + 7524cba commit 435d4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/colortils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ local commands = {

--- Executes command
---@param args table
local function exec_command(args)
function colortils.exec_command(args)
commands[args.fargs[1] or "picker"](args)
end

--- Creates the `Colortils` command
local function create_command()
vim.api.nvim_create_user_command("Colortils", function(args)
exec_command(args)
colortils.exec_command(args)
end, {
nargs = "*",
complete = function(_, _)
Expand Down

0 comments on commit 435d4de

Please sign in to comment.