2010-10-21 62 views
0

Cscope在交互模式下有11個搜索輸入字段。但是,當我嘗試在面向行的輸出模式下使用它並使用-10開關指定Find all symbol assignments:字段時,它不起作用。有任何想法嗎?奇怪的cscope命令行限制

謝謝。

回答

0

賦值選項是由RedHat補丁添加的,它不是原始cscope的一部分。看起來像他們只修補ncurses接口而不更新相應的命令行選項。

1

我也看到了一些小奇怪。

在終端,

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>