diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-07 18:45:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-07 18:45:14 +0200 |
commit | 1f1fd44ef796dd909ff5f3e5288b3fd79294dc71 (patch) | |
tree | 86edf1758d9821ab3ccd5793e646366d76046d3a /runtime | |
parent | bb861e293e0170455184079fa537278754b07911 (diff) | |
download | vim-git-1f1fd44ef796dd909ff5f3e5288b3fd79294dc71.tar.gz |
patch 8.2.0925: getcompletion() does not return command line argumentsv8.2.0925
Problem: Getcompletion() does not return command line arguments.
Solution: Add the "cmdline" option. (Shougo, closes #1140)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 52994f117..94fc49788 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5112,6 +5112,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* behave :behave suboptions color color schemes command Ex command (and arguments) + cmdline |cmdline-completion| result compiler compilers cscope |:cscope| suboptions diff_buffer |:diffget| and |:diffput| completion @@ -5142,14 +5143,19 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* user user names var user variables - If {pat} is an empty string, then all the matches are returned. - Otherwise only items matching {pat} are returned. See - |wildcards| for the use of special characters in {pat}. + If {pat} is an empty string, then all the matches are + returned. Otherwise only items matching {pat} are returned. + See |wildcards| for the use of special characters in {pat}. If the optional {filtered} flag is set to 1, then 'wildignore' is applied to filter the results. Otherwise all the matches are returned. The 'wildignorecase' option always applies. + If {type} is "cmdline", then the |cmdline-completion| result is + returned. For example, to complete the possible values after + a ":call" command: > + echo getcompletion('call ', 'cmdline') +< If there are no matches, an empty list is returned. An invalid value for {type} produces an error. |