[Ag] Escape -

This commit is contained in:
Junegunn Choi
2015-10-17 01:35:21 +09:00
parent 7a5148eed7
commit e3bf9f2487

View File

@@ -389,7 +389,7 @@ endfunction
function! fzf#vim#ag(query, ...)
call s:fzf({
\ 'source': printf('ag --nogroup --column --color "%s"',
\ escape(empty(a:query) ? '^(?=.)' : a:query, '"\')),
\ escape(empty(a:query) ? '^(?=.)' : a:query, '"\-')),
\ 'sink*': s:function('s:ag_handler'),
\ 'options': '--ansi --delimiter : --nth 4.. --prompt "Ag> " '.
\ '--multi --bind ctrl-a:select-all,ctrl-d:deselect-all '.