diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 58c4cdd..a2c1c38 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -7,7 +7,7 @@ com! -nargs=+ Bundle \ call vundle#config#bundle() -com! -nargs=? -bang BundleInstall +com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall \ call vundle#installer#install('!' == '', ) com! -nargs=? -bang BundleClean diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index f4cb418..6fb0c01 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -4,6 +4,10 @@ func! vundle#scripts#search(bang,search_str) call s:display(reverse(results), a:search_str) endf +func! vundle#scripts#complete(a,c,d) + return join(s:load_scripts(0),"\n") +endf + func! s:display(results,search_str) if !exists('s:buff') | let s:buff = tempname() | endif call writefile(['" Search results for: '.a:search_str] + a:results, s:buff)