cscope_dynamic icon indicating copy to clipboard operation
cscope_dynamic copied to clipboard

[Vim-8.1] .cscope.big.files is empty

Open derkling opened this issue 7 years ago • 2 comments

I'm using this plugin to index a Linux kernel source tree with success using VIM 8. Since I've switched to VIM 8.1, the creation of .cscope.big.files generates an empty file... and thus no DB.

Still to investigate on possible issues.

derkling avatar Jun 19 '18 09:06 derkling

The issue seems to be related to my shell, I use ZSH instead of BASH, and by using VIM 8.1 the exec command seems to spawns a ZSH... which was not the case with VIM 8.0.

When the find command is executed on ZSH, it fails with:

zsh: no matches found: *.c

This is the complete command we build:

(set -f;find  .  -name *.c   -or -name *.h -or -name *.C   -or -name *.H -or -name *.c++ -or -name *.h++ -or -name *.cxx -or -name *.hxx -or -name *.cc  -or -name  *.hh -or -name *.cpp -or -name *.hpp -type f| cat - | xargs realpath --relative-to=$(pwd) > .cscope.big.files && nice cscope -kqbR -u -i.cscope.big.files -f.cscope.big; rm .cscopedb.lock) &>/dev/null &

Thus I guess there is some issue with the escaping of the wildcards... which needs to be more robust wrt the shell in use.

Will try to provide a fix for that.

For the time being, a workaround working for me is:

ZSH$> exec bash 
BASH$> SHELL=/bin/bash /path/to/my/vim81

derkling avatar Jun 19 '18 10:06 derkling

Thanks @derkling , that's cool. I was experiencing the same issue! My workaround is a set shell=/bin/bash in the .vimrc.

balsini avatar Jun 19 '18 10:06 balsini