From f0d8f983519db2b8aca0525bfaae39265c0dd9d0 Mon Sep 17 00:00:00 2001 From: gmarik Date: Sun, 6 Mar 2011 15:15:03 -0600 Subject: [PATCH] complete BundleInstall command --- autoload/vundle.vim | 2 +- autoload/vundle/scripts.vim | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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)