Skip to content
Browse files

Integrate with dispatch.vim tab complete

  • Loading branch information...
1 parent a8103f1 commit 37096dbdcb84d89b17e6706f3e4e84da3c2a2990 @tpope committed Jun 13, 2014
Showing with 11 additions and 4 deletions.
  1. +2 −0 compiler/bundler.vim
  2. +9 −4 plugin/bundler.vim
View
2 compiler/bundler.vim
@@ -21,6 +21,8 @@ CompilerSet errorformat=
\%-Z%p^,
\%-G%.%#
+" -complete=customlist,bundler#complete
+
let &cpo = s:cpo_save
unlet s:cpo_save
View
13 plugin/bundler.vim
@@ -522,11 +522,16 @@ function! s:Bundle(bang,arg)
endtry
endfunction
-function! s:BundleComplete(A,L,P)
- if a:L =~# '^\S\+\s\+\%(show\|update\) '
- return s:completion_filter(keys(s:project().paths()),a:A)
+function! s:BundleComplete(A, L, P) abort
+ return bundler#complete(a:A, a:L, a:P, bundler#project())
+endfunction
+
+function! bundler#complete(A, L, P, ...) abort
+ let project = a:0 ? a:1 : bundler#project(getcwd())
+ if !empty(project) && a:L =~# '\s\+\%(show\|update\) '
+ return s:completion_filter(keys(project.paths()), a:A)
endif
- return s:completion_filter(['install','update','exec','package','config','check','list','show','outdated','console','viz','benchmark'],a:A)
+ return s:completion_filter(['install','update','exec','package','config','check','list','show','outdated','console','viz','benchmark'], a:A)
endfunction
function! s:SetupMake() abort

0 comments on commit 37096db

Please sign in to comment.
Something went wrong with that request. Please try again.