universal-ctags / ctags

A maintained ctags implementation
https://ctags.io
GNU General Public License v2.0
6.53k stars 622 forks source link

~/.ctags dotfile no longer honored #2412

Closed rtucek closed 4 years ago

rtucek commented 4 years ago

I've recently pulled some Manjaro updates and it seems to me ctags is somehow ignoring my ~/.ctags config file since then.

$ cat ~/.ctags
--recurse=yes

--exclude=node_modules
--exclude=*.min.js
--exclude=.git

-f .tags

Running just ctags for instance, generates a tags file with content from node_modules, whereas running ctags --options=$HOME/.ctags behaves as expected.

Am I missing something?

Upon investigation, I also noticed the verbose output is a bit different if specifying my dotfile. Is this normal (I expect the first output should be longer than the second, as ~/.ctags config should be merged/appended)?

$ ctags --options=$HOME/.ctags --verbose --version
  Option: --version
Universal Ctags 0.0.0(a3c87ab5), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan  7 2020, 22:54:55
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc

$ ctags  --verbose --version
Installing parsers: CTagsSelfTest, Ada, Ant, Asciidoc, Asm, Asp, Autoconf, AutoIt, Automake, Awk, Basic, BETA, BibTeX, Clojure, CMake, C, C++, CPreProcessor, CSS, C#, Ctags, Cobol, CUDA, D, Diff, DTD, DTS, DosBatch, Eiffel, Elixir, Elm, Erlang, Falcon, Flex, Fortran, Fypp, Gdbinit, Go, HTML, Iniconf, Inko, ITcl, Java, JavaProperties, JavaScript, JSON, LdScript, Lisp, Lua, M4, Man, Make, Markdown, MatLab, Moose, Myrddin, NSIS, ObjectiveC, OldC++, OldC, OCaml, Passwd, Pascal, Perl, Perl6, PHP, Pod, PowerShell, Protobuf, PuppetManifest, Python, PythonLoggingConfig, QemuHX, QtMoc, R, RSpec, REXX, Robot, RpmSpec, ReStructuredText, Ruby, Rust, Scheme, SCSS, Sh, SLang, SML, SQL, SystemdUnit, SystemTap, Tcl, TclOO, Tex, TTCN, TypeScript, Vera, Verilog, SystemVerilog, VHDL, Vim, WindRes, YACC, YumRepo, Zephir, DBusIntrospect, Glade, Maven2, PlistXML, RelaxNG, SVG, XML, XSLT, Yaml, AnsiblePlaybook, Varlink
Setting option defaults
    Setting default header extensions: h, H, hh, hpp, hxx, h++, inc, def
  Installing default language mappings:
    CTagsSelfTest:
    Ada: .adb .ads .Ada .ada
    Ant: (build.xml) .build.xml .ant .xml
    Asciidoc: (*.asc) (*.adoc) (*.asciidoc) .asc .adoc .asciidoc
    Asm: (*.A51) (*.29[kK]) (*.[68][68][kKsSxX]) (*.[xX][68][68]) .asm .ASM .s .S
    Asp: .asp .asa
    Autoconf: (configure.in) .ac
    AutoIt: .au3 .AU3 .aU3 .Au3
    Automake: (Makefile.am) .am
    Awk: .awk .gawk .mawk
    Basic: .bas .bi .bb .pb
    BETA: .bet
    BibTeX: .bib
    Clojure: .clj .cljs .cljc
    CMake: (CMakeLists.txt) .cmake
    C: .c
    C++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx .inl .C .H .CPP .CXX
    CPreProcessor:
    CSS: .css
    C#: .cs
    Ctags: .ctags
    Cobol: .cbl .cob .CBL .COB
    CUDA: .cu .cuh
    D: .d .di
    Diff: .diff .patch
    DTD: .dtd .mod
    DTS: .dts .dtsi
    DosBatch: .bat .cmd
    Eiffel: .e
    Elixir: .ex .exs
    Elm: .elm
    Erlang: .erl .ERL .hrl .HRL
    Falcon: .fal .ftd
    Flex: .as .mxml
    Fortran: .f .for .ftn .f77 .f90 .f95 .f03 .f08 .f15 .F .FOR .FTN .F77 .F90 .F95 .F03 .F08 .F15
    Fypp: .fy
    Gdbinit: (.gdbinit) .gdb
    Go: .go
    HTML: .htm .html
    Iniconf: .ini .conf
    Inko: .inko
    ITcl: .itcl
    Java: .java
    JavaProperties: .properties
    JavaScript: .js .jsx .mjs
    JSON: .json
    LdScript: (*.lds.S) (ld.*) .lds .scr .ld .ldi
    Lisp: .cl .clisp .el .l .lisp .lsp
    Lua: .lua
    M4: .m4 .spt
    Man: .1 .2 .3 .4 .5 .6 .7 .8 .9 .3pm .3stap .7stap
    Make: ([Mm]akefile) (GNUmakefile) .mak .mk
    Markdown: .md .markdown
    MatLab: .m
    Moose:
    Myrddin: .myr
    NSIS: .nsi .nsh
    ObjectiveC: .mm .m .h
    OldC++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx .inl .C .H
    OldC: .c
    OCaml: .ml .mli .aug
    Passwd: (passwd)
    Pascal: .p .pas
    Perl: .pl .pm .ph .plx .perl
    Perl6: .p6 .pm6 .pm .pl6
    PHP: .php .php3 .php4 .php5 .php7 .phtml
    Pod: .pod
    PowerShell: .ps1 .psm1
    Protobuf: .proto
    PuppetManifest: .pp
    Python: .py .pyx .pxd .pxi .scons .wsgi
    PythonLoggingConfig:
    QemuHX: .hx
    QtMoc:
    R: .r .R .s .q
    RSpec:
    REXX: .cmd .rexx .rx
    Robot: .robot
    RpmSpec: .spec
    ReStructuredText: .rest .reST .rst
    Ruby: .rb .ruby
    Rust: .rs
    Scheme: .SCM .SM .sch .scheme .scm .sm .rkt
    SCSS: .scss
    Sh: .sh .SH .bsh .bash .ksh .zsh .ash
    SLang: .sl
    SML: .sml .sig
    SQL: .sql
    SystemdUnit: .unit .service .socket .device .mount .automount .swap .target .path .timer .snapshot .scope .slice .time
    SystemTap: .stp .stpm
    Tcl: .tcl .tk .wish .exp
    TclOO:
    Tex: .tex
    TTCN: .ttcn .ttcn3
    TypeScript: .ts
    Vera: .vr .vri .vrh
    Verilog: .v
    SystemVerilog: .sv .svh .svi
    VHDL: .vhdl .vhd
    Vim: (vimrc) ([._]vimrc) (gvimrc) ([._]gvimrc) .vim .vba
    WindRes: .rc
    YACC: .y
    YumRepo: .repo
    Zephir: .zep
    DBusIntrospect: .xml
    Glade: .glade
    Maven2: (pom.xml) .pom .xml
    PlistXML: .plist
    RelaxNG: .rng
    SVG: .svg
    XML: .xml
    XSLT: .xsl .xslt
    Yaml: .yml
    AnsiblePlaybook:
    Varlink: .varlink
  Installing default language aliases:
    CTagsSelfTest:
    Ada:
    Ant:
    Asciidoc:
    Asm:
    Asp:
    Autoconf:
    AutoIt:
    Automake:
    Awk:  gawk mawk
    Basic:
    BETA:
    BibTeX:
    Clojure:
    CMake:
    C:
    C++:
    CPreProcessor:
    CSS:
    C#:  csharp
    Ctags:
    Cobol:
    CUDA:
    D:
    Diff:
    DTD:
    DTS:
    DosBatch:
    Eiffel:
    Elixir:
    Elm:
    Erlang:
    Falcon:
    Flex:
    Fortran:
    Fypp:
    Gdbinit:
    Go:
    HTML:
    Iniconf:
    Inko:
    ITcl:
    Java:
    JavaProperties:
    JavaScript:  js node nodejs seed gjs
    JSON:
    LdScript:  ld-script
    Lisp:  clisp emacs-lisp
    Lua:
    M4:
    Man:
    Make:  makefile
    Markdown:
    MatLab:
    Moose:
    Myrddin:
    NSIS:
    ObjectiveC:  objc objective-c
    OldC++:
    OldC:
    OCaml:  tuareg caml
    Passwd:
    Pascal:
    Perl:
    Perl6:
    PHP:
    Pod:
    PowerShell:
    Protobuf:
    PuppetManifest:
    Python:  python[23]* scons
    PythonLoggingConfig:
    QemuHX:
    QtMoc:
    R:
    RSpec:
    REXX:
    Robot:
    RpmSpec:  rpm-spec
    ReStructuredText:
    Ruby:
    Rust:
    Scheme:  gosh guile racket
    SCSS:
    Sh:  sh bash ksh zsh ash shell-script
    SLang:
    SML:
    SQL:
    SystemdUnit:
    SystemTap:  .stap
    Tcl:  expect tclsh
    TclOO:
    Tex:
    TTCN:
    TypeScript:
    Vera:
    Verilog:
    SystemVerilog:
    VHDL:
    Vim:
    WindRes:
    YACC:
    YumRepo:
    Zephir:
    DBusIntrospect:
    Glade:
    Maven2:
    PlistXML:
    RelaxNG:
    SVG:
    XML:
    XSLT:
    Yaml:
    AnsiblePlaybook:
    Varlink:
  Installing default exclude patterns:
    adding exclude pattern: {arch}
    adding exclude pattern: .arch-ids
    adding exclude pattern: .arch-inventory
    adding exclude pattern: autom4te.cache
    adding exclude pattern: BitKeeper
    adding exclude pattern: .bzr
    adding exclude pattern: .bzrignore
    adding exclude pattern: CVS
    adding exclude pattern: .cvsignore
    adding exclude pattern: _darcs
    adding exclude pattern: .deps
    adding exclude pattern: .DS_Store
    adding exclude pattern: EIFGEN
    adding exclude pattern: .git
    adding exclude pattern: .gitignore
    adding exclude pattern: .gitattributes
    adding exclude pattern: .hg
    adding exclude pattern: .hgignore
    adding exclude pattern: PENDING
    adding exclude pattern: RCS
    adding exclude pattern: RESYNC
    adding exclude pattern: SCCS
    adding exclude pattern: .svn
    adding exclude pattern: *~
    adding exclude pattern: .*.swp
    adding exclude pattern: *.o
    adding exclude pattern: *.a
    adding exclude pattern: *.so
    adding exclude pattern: *.obj
    adding exclude pattern: *.lib
    adding exclude pattern: *.dll
    adding exclude pattern: *.exe
    adding exclude pattern: *.gcno
    adding exclude pattern: *.gcda
    adding exclude pattern: *.class
    adding exclude pattern: *.pyc
    adding exclude pattern: *.pyo
Entering configuration stage: loading file(s) under $XDG_CONFIG_HOME and $HOME/.config
Entering configuration stage: loading file(s) under $HOME
Entering configuration stage: loading file(s) under the current directory
Entering configuration stage: loading environment variable
Reading initial options from command line
Entering configuration stage: loading command line
  Option: --version
Universal Ctags 0.0.0(a3c87ab5), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan  7 2020, 22:54:55
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc
k-takata commented 4 years ago

It is one of the noticeable incompatibilities from exuberant ctags. https://docs.ctags.io/en/latest/man/ctags-incompatibilities.7.html#option-files-loading-at-starting-up-time-preload-files

rtucek commented 4 years ago

Hm... either my dotfile has never worked before or I managed somehow to switch from exuberant ctags to universal ctags without realizing... either way - thank you for pointing that out!