Skip to content

cscope db cannot be created on macbook #8

@renzhengeek

Description

@renzhengeek

Hi,

I love this great plugin! But it doesn't work well after I use it on macbook. The problem is: every time after I pressed F4, any cscope command, e.g. cs show, results in cscope no connection error.

After some debugging, it turns out that the issue is with the find command. The change below fixes it for me:

diff --git a/plugin/autotags.vim b/plugin/autotags.vim
index 0f59354..ba03ba6 100644
--- a/plugin/autotags.vim
+++ b/plugin/autotags.vim
@@ -195,7 +195,7 @@ fun! s:AutotagsInit()
     endif
 
     let s:cscope_file_pattern = '.*\' .
-        \ join(split(g:autotags_cscope_file_extensions, " "), '\|.*\')
+        \ join(split(g:autotags_cscope_file_extensions, " "), '|.*\')
 
     if !exists("g:autotags_export_cscope_dir")
         let g:autotags_export_cscope_dir = 0
@@ -345,7 +345,7 @@ fun! s:AutotagsGenerateC(sourcedir, tagsdir)
     echomsg "updating cscopedb in " . shellescape(l:cscopedir) ." for " .
         \ shellescape(a:sourcedir)
     echomsg system("cd " . shellescape(l:cscopedir) . " && " .
-        \ " nice -15 find " . shellescape(a:sourcedir) .
+        \ " nice -15 find -E " . shellescape(a:sourcedir) .
         \ " -not -regex '.*\\.git.*' " .
         \ " -regex '" . s:cscope_file_pattern . "' " .
         \ " -print > cscope.files")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions