From 28353bd0609ae7b8c7e01c70dce31700d8c6e654 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 7 Mar 2016 10:32:52 +0000 Subject: [PATCH] Add grep information to debug output. --- autoload/gitgutter/debug.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoload/gitgutter/debug.vim b/autoload/gitgutter/debug.vim index 2e19d80..d5b4304 100644 --- a/autoload/gitgutter/debug.vim +++ b/autoload/gitgutter/debug.vim @@ -12,6 +12,9 @@ function! gitgutter#debug#debug() call gitgutter#debug#git_version() call gitgutter#debug#separator() + call gitgutter#debug#grep_version() + call gitgutter#debug#separator() + call gitgutter#debug#option('updatetime') call gitgutter#debug#option('shell') call gitgutter#debug#option('shellcmdflag') @@ -42,6 +45,14 @@ function! gitgutter#debug#git_version() call gitgutter#debug#output( substitute(v, '\n$', '', '') ) endfunction +function! gitgutter#debug#grep_version() + let v = system('grep --version') + call gitgutter#debug#output( substitute(v, '\n$', '', '') ) + + let v = system('grep --help') + call gitgutter#debug#output( substitute(v, '\%x00', '', 'g') ) +endfunction + function! gitgutter#debug#option(name) if exists('+' . a:name) let v = eval('&' . a:name)