[vim/vim] add -nargs=_ command argument (PR #20189)

1 view
Skip to first unread message

Maxim Kim

unread,
May 10, 2026, 11:51:00 PM (12 hours ago) May 10
to vim/vim, Subscribed

It should allow user commands to have a single argument with spaces.

For example given the following Test command and TestComplete function:

vim9script
def TestComplete(A: string, _: string, : number): list
var all = ["qqqq", "aaaa", "qq aa"]
return all->matchfuzzy(A)
enddef
command! -nargs=
-complete=customlist,TestComplete Test echo

:Test q a<tab> should successfully complete qq aa

Relates #20102


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20189

Commit Summary

  • e48b5a2 add -nargs=_ command argument

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20189@github.com>

Reply all
Reply to author
Forward
0 new messages