I set up cscope as explained in this tutorial. I do not want to regenerate my database on every invocation of cscope and hence I start it cscope -d
. But the problem is, I need to run this command from the directory where my DB, cscope.out resides. I keep shuffling across directories and I want the flexibility to start cscope from anywhere. I tried putting CSCOPE_DB=~/cscope/cscope.out; export CSCOPE_DB
in my .bash_profile/.bashrc to no avail. I also have export CSCOPE_EDITOR=vim
in my bash profile files and as such can invoke cscope from within vim from any directory but not the standalone cscope! It always throws the error
cscope: cannot open file cscope.out
How can I do this?