2010-06-03 58 views
28

當我運行ctags -R *時,出現錯誤,指出所有目錄不是常規文件,而是跳過它們而不是遞歸地爲它們生成標記。ctags命令不會遞歸說「它不是普通文件」

ctags: skipping arpa: it is not a regular file. 
ctags: skipping asm: it is not a regular file. 
ctags: skipping asm-generic: it is not a regular file. 
ctags: skipping bits: it is not a regular file. 
ctags: skipping blkid: it is not a regular file. 
ctags: skipping boost: it is not a regular file. 

什麼問題?

回答

59

thisthis類似的,問題是你沒有運行旺盛Ctags的,你運行GNU Emacs的etags,這也提供了一個ctags可執行文件。運行ctags --version,你會看到這樣的內容:

ctags (GNU Emacs 23.1) 
Copyright (C) 2009 Free Software Foundation, Inc. 
This program is distributed under the terms in ETAGS.README 

如果您在男子頁看,你會發現其實-R相當於--no-regex。事實上,手冊頁甚至沒有提及遞歸作爲選項。

-R, --no-regex 
      Don't do any more regexp matching on the following files. May 
      be freely intermixed with filenames and the --regex option. 

你也許可以產生遞歸使用shell魔術的標籤,但你可能會碰到在路上的問題,如果你希望旺盛的C標籤。所以最好的解決方案可能是安裝的ctags你想代替:

sudo apt-get install exuberant-ctags 

旺盛C標籤也可以從源代碼安裝:

http://ctags.sourceforge.net/ 
+1

安裝旺盛,ctags的(對於問題而言一個簡單的搜索在谷歌變成了沒有什麼用處,所以希望這將幫助人們在未來) – indiv 2010-06-03 18:01:06

+2

+1對於解決問題的非常有用的答案 – 2012-11-24 10:48:16

7

,如果你已經安裝了貓王的工具出現。喜歡的東西

sudo apt-get remove elvis-tools 

刪除它們,然後通過

sudo apt-get install exuberant-ctags 
+0

+1它解決了我的問題 – 2012-12-12 12:29:43

相關問題