@@ -1536,7 +1536,7 @@ function! s:CreateOptionsString()
1536
1536
" call add(s:Options, "\"Current Directory: ".s:GetCwdEscaped())
1537
1537
call add (s: Options , " \" Grep Targets: " .join (s: GetFileTargetList (0 ), ' ' ))
1538
1538
call add (s: Options , " \" Inclusions: " .(! empty (g: EasyGrepFilesToInclude ) ? g: EasyGrepFilesToInclude : " none" ))
1539
- call add (s: Options , " \" Exclusions: " .(! empty (g: EasyGrepFilesToExclude ) ? g: EasyGrepFilesToExclude : " none" ).(empty (g: EasyGrepFilesToExclude ) || s: CommandSupportsExclusions () ? " " : " (only supported with vimgrep or a grepprg of 'ack' or 'grep' )" ))
1539
+ call add (s: Options , " \" Exclusions: " .(! empty (g: EasyGrepFilesToExclude ) ? g: EasyGrepFilesToExclude : " none" ).(empty (g: EasyGrepFilesToExclude ) || s: CommandSupportsExclusions () ? " " : " (not supported with grepprg=' " . s: GetGrepProgramName (). " ' )" ))
1540
1540
call add (s: Options , " " )
1541
1541
1542
1542
endfunction
@@ -2346,7 +2346,8 @@ endfunction
2346
2346
" }}}
2347
2347
" CommandSupportsExclusions {{{
2348
2348
function ! s: CommandSupportsExclusions ()
2349
- return s: IsCommandAck () || s: IsCommandGrep () || s: IsCommandVimgrep ()
2349
+ let commandParams = s: GetGrepCommandParameters ()
2350
+ return commandParams[" supportsexclusions" ] == 1
2350
2351
endfunction
2351
2352
" }}}
2352
2353
" IsCommandVimgrep {{{
@@ -2384,6 +2385,7 @@ function! s:GetGrepCommandParameters()
2384
2385
2385
2386
if s: IsCommandVimgrep ()
2386
2387
return {
2388
+ \ ' supportsexclusions' : ' 1' ,
2387
2389
\ ' recurse' : ' ' ,
2388
2390
\ ' caseignore' : ' ' ,
2389
2391
\ ' casematch' : ' ' ,
@@ -2399,6 +2401,7 @@ function! s:GetGrepCommandParameters()
2399
2401
\ }
2400
2402
elseif s: IsCommandGrep ()
2401
2403
return {
2404
+ \ ' supportsexclusions' : ' 1' ,
2402
2405
\ ' recurse' : ' -R' ,
2403
2406
\ ' caseignore' : ' -i' ,
2404
2407
\ ' casematch' : ' ' ,
@@ -2414,6 +2417,7 @@ function! s:GetGrepCommandParameters()
2414
2417
\ }
2415
2418
elseif s: IsCommandGitGrep ()
2416
2419
return {
2420
+ \ ' supportsexclusions' : ' 0' ,
2417
2421
\ ' recurse' : ' -R' ,
2418
2422
\ ' caseignore' : ' -i' ,
2419
2423
\ ' casematch' : ' ' ,
@@ -2429,6 +2433,7 @@ function! s:GetGrepCommandParameters()
2429
2433
\ }
2430
2434
elseif s: IsCommandAck ()
2431
2435
return {
2436
+ \ ' supportsexclusions' : ' 1' ,
2432
2437
\ ' recurse' : ' ' ,
2433
2438
\ ' caseignore' : ' -i' ,
2434
2439
\ ' casematch' : ' ' ,
@@ -2444,6 +2449,7 @@ function! s:GetGrepCommandParameters()
2444
2449
\ }
2445
2450
elseif s: IsCommandPt ()
2446
2451
return {
2452
+ \ ' supportsexclusions' : ' 0' ,
2447
2453
\ ' recurse' : ' ' ,
2448
2454
\ ' caseignore' : ' -i' ,
2449
2455
\ ' casematch' : ' ' ,
@@ -2459,6 +2465,7 @@ function! s:GetGrepCommandParameters()
2459
2465
\ }
2460
2466
elseif s: IsCommandFindstr ()
2461
2467
return {
2468
+ \ ' supportsexclusions' : ' 0' ,
2462
2469
\ ' recurse' : ' /S' ,
2463
2470
\ ' caseignore' : ' /I' ,
2464
2471
\ ' casematch' : ' /i' ,
0 commit comments