Search code examples
ctagsexuberant-ctags

Exuberant Ctags: undocumented extension fields


I'm looking at the tags file that Exuberant Ctags generated for my ruby project, and reading the documentation for the Tag File Format:

tag_name<TAB>file_name<TAB>ex_cmd;"<TAB>extension_fields

My tags file has lots of lines like:

MyThing<TAB>lib/my_thing.rb<TAB>/^class MyThing$/;"<TAB>c

It's just my burning curiosity, but I can't find any explanation of what the trailing <TAB>c extension field indicates.


Solution

  • After downloading the ctags source (and indexing it with ctags), I see in ruby.c that the extension fields are pretty simple:

    /*
    *   DATA DEFINITIONS
    */
    static kindOption RubyKinds [] = {
        { TRUE, 'c', "class",  "classes" },
        { TRUE, 'f', "method", "methods" },
        { TRUE, 'm', "module", "modules" },
        { TRUE, 'F', "singleton method", "singleton methods" }
    };