motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 2b05b275f5fdda13e97d4cfe41600bdfe45eb756 (tree)
parent c4713200f76550f3f310fe7e176925d3f4ec1809
Author: Tim Pope <code@tpope.net>
Date:   Tue, 17 Jun 2014 02:30:30 -0400

Simplify tab completion

Diffstat:
Mplugin/fugitive.vim | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -655,10 +655,8 @@ function! s:GitComplete(A,L,P) abort let cmds = map(split(glob(s:exec_path.'/git-*'),"\n"),'s:sub(v:val[strlen(s:exec_path)+5 : -1],"\\.exe$","")') if a:L =~ ' [[:alnum:]-]\+ ' return s:repo().superglob(a:A) - elseif a:A == '' - return sort(cmds+keys(s:repo().aliases())) else - return filter(sort(cmds+keys(s:repo().aliases())),'v:val[0:strlen(a:A)-1] ==# a:A') + return filter(sort(cmds+keys(s:repo().aliases())), 'strpart(v:val, 0, strlen(a:A)) ==# a:A') endif endfunction