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.
问题是什么?
When I run ctags -R *
, I get errors saying that all directories are not regular files and it skips them instead of recursively generating tags for them.
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.
What is the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
类似于 此 和 这个,问题是你没有运行 Exuberant Ctags,你运行的是 GNU Emacs
etags
,它还提供了ctags
可执行文件。运行ctags --version
,您会看到类似这样的内容:如果您查看手册页,您会发现
-R
实际上相当于--无正则表达式
。事实上,手册页甚至没有提到递归作为一个选项。您可能可以使用 shell magic 递归地生成标签,但是如果您期待 Exuberant Ctags,那么您可能会遇到问题。因此,最好的解决方案可能是安装您想要的 ctags:
Exuberant Ctags 也可以从源代码安装:
Similar to this and this, the problem is you're not running Exuberant Ctags, you're running GNU Emacs
etags
, which also provides actags
executable. Runctags --version
and you'll see something like this:And if you look in the man page, you'll see that
-R
is actually equivalent to--no-regex
. In fact, the man page doesn't even mention recursion as an option.You could probably generate the tags recursively using shell magic, but you may run into problems down the road if you're expecting Exuberant Ctags. So the best solution is probably to install the ctags you want instead:
Exuberant Ctags can also be installed from source:
如果您安装了 elvis-tools,就会发生这种情况。使用类似的方法删除它们
,然后安装 exuberant-ctags
It occurs if you have elvis-tools installed . remove them with something like
and then install exuberant-ctags by