vim-patch:9.1.0770: current command line completion is a bit limited (#30728)

Problem:  current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
          function (Ruslan Russkikh).

closes: vim/vim#15823

0407d621bb

Co-authored-by: Ruslan Russkikh <dvrussk@yandex.ru>
This commit is contained in:
zeertzjq
2024-10-09 08:14:18 +08:00
committed by GitHub
parent e98b1b0235
commit f449a38f6a
11 changed files with 161 additions and 23 deletions

View File

@ -2879,12 +2879,22 @@ function vim.fn.getcharsearch() end
--- @return string
function vim.fn.getcharstr(expr) end
--- Return completion pattern of the current command-line.
--- Only works when the command line is being edited, thus
--- requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
--- Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
--- |getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|.
--- Returns an empty string when completion is not defined.
---
--- @return string
function vim.fn.getcmdcomplpat() end
--- Return the type of the current command-line completion.
--- Only works when the command line is being edited, thus
--- requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
--- See |:command-completion| for the return string.
--- Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
--- |getcmdprompt()| and |setcmdline()|.
--- |getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
--- Returns an empty string when completion is not defined.
---
--- @return string