【问题标题】:The ctags command doesn't recurse saying "it is not a regular file"ctags 命令不会递归说“它不是常规文件”
【发布时间】:2011-02-27 10:52:52
【问题描述】:

当我运行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.

有什么问题?

【问题讨论】:

    标签: ctags exuberant-ctags


    【解决方案1】:

    类似于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 魔法递归地生成标签,但如果您期待 Exuberant Ctags,您可能会遇到问题。所以最好的解决方案可能是安装你想要的 ctags:

    sudo apt-get install exuberant-ctags
    

    Exuberant Ctags 也可以从源代码安装:

    http://ctags.sourceforge.net/
    

    【讨论】:

    • (在 google 上直接搜索问题术语没有任何用处,因此希望这对未来的人们有所帮助)
    【解决方案2】:

    如果您安装了 elvis-tools,就会发生这种情况。用类似的东西删除它们

    sudo apt-get remove elvis-tools 
    

    然后通过

    安装 exuberant-ctags
    sudo apt-get install exuberant-ctags
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-18
      • 2021-05-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多