fix(plugin): allow command chaining with bar separator (#29)
Problem: :Pending|only failed because the command definition lacked the bar attribute, causing | to be consumed as an argument. Solution: Add bar = true to nvim_create_user_command so | is treated as a command separator, matching fugitive's :Git behavior.
This commit is contained in:
parent
5935124668
commit
4f4048228e
1 changed files with 1 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ vim.g.loaded_pending = true
|
||||||
vim.api.nvim_create_user_command('Pending', function(opts)
|
vim.api.nvim_create_user_command('Pending', function(opts)
|
||||||
require('pending').command(opts.args)
|
require('pending').command(opts.args)
|
||||||
end, {
|
end, {
|
||||||
|
bar = true,
|
||||||
nargs = '*',
|
nargs = '*',
|
||||||
complete = function(arg_lead, cmd_line)
|
complete = function(arg_lead, cmd_line)
|
||||||
local subcmds = { 'add', 'sync', 'archive', 'due', 'undo' }
|
local subcmds = { 'add', 'sync', 'archive', 'due', 'undo' }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue