奇怪的cscope命令行限制
问题描述:
Cscope在交互模式下有11个搜索输入字段。但是,当我尝试在面向行的输出模式下使用它并使用-10
开关指定Find all symbol assignments:
字段时,它不起作用。有任何想法吗?奇怪的cscope命令行限制
谢谢。
答
赋值选项是由RedHat补丁添加的,它不是原始cscope的一部分。看起来像他们只修补ncurses接口而不更新相应的命令行选项。
答
我也看到了一些小奇怪。
在终端,
cscope -d
提供了以下选项
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
但是,使用GVIM我cscope的插件,
:cs help
提供了以下选项
find : Query for a pattern (Usage: find c|d|e|f|g|i|s|t name)
c: Find functions calling this function
d: Find functions called by this function
e: Find this egrep pattern
f: Find this file
g: Find this definition
i: Find files #including this file
s: Find this C symbol
t: Find assignments to
“查找分配给”选项仅在第二个选项中可用。
因此,对于面向行的输出模式,最接近的似乎是“Find this text string:”选项。可以这样做
cscope -d -L -4 <text>