diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2017-01-07 17:36:54 +0100 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2017-01-08 23:49:11 +0100 |
commit | 370379a48624743a71d751fdd25868a876ea76e4 (patch) | |
tree | 82398b1ed3a60cc721f3190cff6ecd1f486903af | |
parent | e7b1b5d6ed66141215a4b103563b42cc47b7c96e (diff) | |
download | rneovim-370379a48624743a71d751fdd25868a876ea76e4.tar.gz rneovim-370379a48624743a71d751fdd25868a876ea76e4.tar.bz2 rneovim-370379a48624743a71d751fdd25868a876ea76e4.zip |
health: completion for :CheckHealth
-rw-r--r-- | runtime/plugin/health.vim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/plugin/health.vim b/runtime/plugin/health.vim index 3c8e509acd..e3482cb0fe 100644 --- a/runtime/plugin/health.vim +++ b/runtime/plugin/health.vim @@ -1 +1,8 @@ -command! -nargs=* CheckHealth call health#check([<f-args>]) +function! s:complete(lead, _line, _pos) abort + return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1), + \ 'fnamemodify(v:val, ":t:r")'), + \ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead')) +endfunction + +command! -nargs=* -complete=customlist,s:complete CheckHealth + \ call health#check([<f-args>]) |