1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

Fix grep for OSX (#3955)

Grep doesn't have the -P option in macOS
This commit is contained in:
Albert G 2020-11-16 15:41:23 +01:00 committed by GitHub
parent b85a6f44cc
commit 3d525cb8c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,9 +35,12 @@ elseif executable('ag') && !exists('g:ctrlp_user_command')
elseif s:SYS.isWindows
let g:ctrlp_user_command =
\ 'dir %s /-n /b /s /a-d | findstr /v /l ".jpg \\tmp\\"' " Windows
elseif s:SYS.isOSX
let g:ctrlp_user_command =
\ 'find %s -type f | grep --invert-match --extended-regexp "\.jpg$|/tmp/"' " MacOSX
else
let g:ctrlp_user_command =
\ 'find %s -type f | grep -v -P "\.jpg$|/tmp/"' " MacOSX/Linux
\ 'find %s -type f | grep -v -P "\.jpg$|/tmp/"' " Linux
endif
if !exists('g:ctrlp_match_func') && (has('python') || has('python3'))
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }