Skip to content

Commit b4e32b8

Browse files
committed
Add capability to warn with certain programs
Findstr is a buggy program and it doesn't pass even the most simple tests when used outside of EasyGrep. In particular, it's regular expression evaluation appears to be broken and its recursive search is bad too. I will likely remove support for this in a future commit.
1 parent f9e91ee commit b4e32b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugin/EasyGrep.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,6 +2077,10 @@ endfunction
20772077
" CheckCommandRequirements {{{
20782078
function! s:CheckCommandRequirements()
20792079
call s:SanitizeMode()
2080+
if s:CommandHasLen("opt_str_warnonuse")
2081+
let commandParams = s:GetGrepCommandParameters()
2082+
call s:Warning(commandParams["opt_str_warnonuse"])
2083+
endif
20802084
endfunction
20812085
" }}}
20822086
" Extension Tracking {{{
@@ -2687,6 +2691,7 @@ function! s:ConfigureGrepCommandParameters()
26872691
\ 'req_str_recurse': '/S',
26882692
\ 'req_str_caseignore': '/I',
26892693
\ 'req_str_casematch': '',
2694+
\ 'opt_str_warnonuse': 'The findstr program is buggy and not-recommended for use',
26902695
\ 'opt_str_patternprefix': '',
26912696
\ 'opt_str_patternpostfix': '',
26922697
\ 'opt_str_wholewordprefix': '"\<',

0 commit comments

Comments
 (0)