use*_*014 6 linux vim bash symlink cscope
我有一个包含多个文件的源目录.其中一些是其他文件的符号链接.
我创建了一个cscope.files文件.但是当我执行cscope时.它抱怨符号链接的文件:
cscope: cannot find file /home/bla/source/file.cc
Run Code Online (Sandbox Code Playgroud)
我认为这不是很好,但也许正确的方法是更改"查找"脚本,只是编写符号链接的目的地?
目前我正在使用:
# Write only the files which are NOT symlinks
find `pwd` \( \( -iname "*.c" -o -iname "*.cc" -o -iname "*.h" \) -and \( -not -type l \) \) -print > cscope.files
# Add the target of the symlink for all files matching the right extension, and are symlinks
find `pwd` \( \( -iname "*.c" -o -iname "*.cc" -o -iname "*.h" \) -and -type l \) -printf "%l\n" >> cscope.files
Run Code Online (Sandbox Code Playgroud)
但这似乎是一个可怕的解决方案.还在寻找一个更好的