feat(lua): add <f-args> to user commands callback (#17522)

Works similar to ex <f-args>. It only splits the arguments if the
command has more than one posible argument. In cases were the command
can only have 1 argument opts.fargs = { opts.args }
This commit is contained in:
Javier Lopez
2022-02-27 14:35:06 -05:00
committed by GitHub
parent c65d93e60a
commit 1b5767aa34
5 changed files with 109 additions and 11 deletions

View File

@@ -651,6 +651,9 @@ nvim_add_user_command({name}, {command}, {*opts})
that contains the following keys:
• args: (string) The args passed to the
command, if any |<args>|
• fargs: (table) The args split by unescaped
whitespace (when more than one argument is
allowed), if any |<f-args>|
• bang: (boolean) "true" if the command was
executed with a ! modifier |<bang>|
• line1: (number) The starting line of the