ctags - ctags命令不会递归说 “it is not a regular file”

标签 ctags exuberant-ctags

当我运行ctags -R *时,我收到错误消息,指出所有目录都不是常规文件,它会跳过它们,而不是为它们递归生成标签。

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.

问题是什么?

最佳答案

thisthis相似,问题在于您没有运行Exuberant 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 Magic递归生成标签,但是如果您期望使用Exuberant Ctags,则可能会遇到麻烦。因此,最好的解决方案可能是安装所需的ctags:
sudo apt-get install exuberant-ctags

旺盛的Ctags也可以从源代码安装:
http://ctags.sourceforge.net/

关于ctags - ctags命令不会递归说 “it is not a regular file”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2968542/

相关文章:

perl - 对 MooseX::Declare 的 ctags 支持? (Perl)

vim - 我在哪里可以找到 Vim `tags` 选项的完整引用?

Ctag 不工作

r - 带有R的旺盛标签

c - 如何为 linux C 开发设置 ctags?

ctags - 向ctags添加新的lang不起作用

vim - ctags,使用多个路径生成标签?

vim - 如何使ctags在垂直拆分上显示标签定义而不打开新的拆分?

emacs - 在emacs中使用旺盛的ctags时如何指定和使用verilog语言的头文件

vim - 标签列表 : Exuberant ctags not found in PATH