ctags(1)
โจ NAME โจ
ctags โ generate tag files for source code ๐ท๏ธโจ
๐ฆ SYNOPSIS ๐ฆ
ctags [<options>] [<source_file(s)>]
etags [<options>] [<source_file(s)>]
๐ DESCRIPTION ๐
Ok so ctags and etags (peep the -e option for that mode) โ collectively called ctags unless we're being specific โ generate an index (or "tag") file for a bunch of language objects found in source file(s). That tag file lets a text editor or other utilities (client tools) quickly and easily locate these items. A tag means a language object that has an index entry available (or, alternatively, the index entry created for that object). ๐
Alternatively, ctags can generate a cross reference file which lists, in human readable form, information about the various language objects found in a set of source files. โจ
Tag index files are supported by numerous editors, which let the user locate the object associated with a name appearing in a source file and jump to the file and line which defines the name. See the manual of your favorite editor about utilizing ctags command and the tag index files in the editor. ๐ฆ
ctags is capable of generating different kinds of tags for each of many different languages. For a complete list of supported languages, the names by which they are recognized, and the kinds of tags which are generated for each, see the --list-languages and --list-kinds-full options. ๐
This man page describes Universal Ctags, an implementation of ctags derived from Exuberant Ctags. The major incompatible changes between Universal Ctags and Exuberant Ctags are enumerated in ctags-incompatibilities(7). ๐ญ
One of the advantages of Exuberant Ctags is that it allows a user to define a new parser from the command line. Extending this capability is one of the major features of Universal Ctags. ctags-optlib(7) describes how the capability is extended. ๐ง
Newly introduced experimental features are not explained here. If you are interested in such features and ctags internals, visit <https://docs.ctags.io/>. ๐ฅ
๐ COMMAND LINE INTERFACE ๐
Despite the wealth of available options, defaults are set so that ctags is most commonly executed without any options (e.g. ctags *, or ctags -R), which will create a tag file in the current directory for all recognized source files. The options described below are provided merely to allow custom tailoring to meet special needs. ๐
Note that spaces separating the single-letter options from their parameters are optional. ๐ซถ
Note also that the boolean parameters to the long form options (those beginning with -- and that take a [=(yes|no)] parameter) may be omitted, in which case =yes is implied. (e.g. --sort is equivalent to --sort=yes). Note further that =1, =on, and =true are considered synonyms for =yes, and that =0, =off, and =false are considered synonyms for =no. โจ
Some options are either ignored or useful only when used while running in etags mode (see -e option). Such options will be noted. ๐ธ
<options> must precede the <source_file(s)> following the standard POSIX convention. ๐
Options taking language names will accept those names in either upper or lower case. See the --list-languages option for a complete list of the built-in language names. ๐
๐ค Letters and names ๐ค
Some options take one-letter flags as parameters (e.g. --kinds-<LANG> option). Specifying just letters help a user create a complicated command line quickly. However, a command line including sequences of one-letter flags becomes difficult to understand. ๐ตโ๐ซ
Universal Ctags accepts long-name flags in addition to such one-letter flags. The long-name and one-letter flags can be mixed in an option parameter by surrounding each long-name by braces. Thus, for an example, the following three notations for --kinds-C option have the same meaning: ๐ฏ
--kinds-C=+pLl
--kinds-C=+{prototype}{label}{local}
--kinds-C=+{prototype}L{local}
Note that braces may be meta characters in your shell. Put single quotes in such case. ๐
--list-... options shows one-letter flags and associated long-name flags. ๐
๐ List options ๐
Universal Ctags introduces many --list-... options that provide the internal data of Universal Ctags (See "Listing Options"). Both users and client tools may use the data. --with-list-header and --machinable options adjust the output of the most of --list-... options. โจ
The default setting (--with-list-header=yes and --machinable=no) is for using interactively from a terminal. The header that explains the meaning of columns is simply added to the output, and each column is aligned in all lines. The header line starts with a hash ('#') character. ๐ป
For scripting in a client tool, --with-list-header=no and --machinable=yes may be useful. The header is not added to the output, and each column is separated by tab characters. ๐ค
Note the order of columns will change in the future release. However, labels in the header will not change. So by scanning the header, a client tool can find the index for the target column. ๐ฎ
๐ OPTIONS ๐
ctags has more options than listed here. Options starting with an underscore character, such as --_echo=<msg>, are not listed here. They are experimental or for debugging purpose. ๐
Notation: <foo> is for a variable string foo, [ ... ] for optional, | for selection, and ( ... ) for grouping. For example --foo[=(yes|no)] means --foo, --foo=yes, or --foo=no. ๐
๐ Input/Output File Options ๐
--exclude=<pattern>โ Add<pattern>to a list of excluded files and directories. This option may be specified as many times as desired. For each file name considered byctags, each pattern specified using this option will be compared against both the complete path (e.g.some/path/base.ext) and the base name (e.g.base.ext) of the file, thus allowing patterns which match a given file name irrespective of its path, or match only a specific path. ๐ซ
If appropriate support is available from the runtime library of your C compiler, then pattern may contain the usual shell wildcards (not regular expressions) common on Unix (be sure to quote the option parameter to protect the wildcards from being expanded by the shell before being passed to ctags; also be aware that wildcards can match the slash character, '/'). You can determine if shell wildcards are available on your platform by examining the output of the --list-features option, which will include wildcards in the compiled feature list; otherwise, pattern is matched against file names using a simple textual comparison. ๐
If <pattern> begins with the character '@', then the rest of the string is interpreted as a file name from which to read exclusion patterns, one per line. If pattern is empty, the list of excluded patterns is cleared. ๐งน
Note that at program startup, the default exclude list contains names of common hidden and system files, patterns for binary files, and directories for which it is generally not desirable to descend while processing the --recurse option. To see the list of built-in exclude patterns, use --list-excludes. ๐
See also the description for --exclude-exception= option. ๐
--exclude-exception=<pattern>โ Add<pattern>to a list of included files and directories. The pattern affects the files and directories that are excluded by the pattern specified with--exclude=option. โจ
For an example, you want ctags to ignore all files under foo directory except foo/main.c, use the following command line: --exclude=foo/* --exclude-exception=foo/main.c. ๐ฏ
--filter[=(yes|no)]โ Makesctagsbehave as a filter, reading source file names from standard input and printing their tags to standard output on a file-by-file basis. If--sortis enabled, tags are sorted only within the source file in which they are defined. File names are read from standard input in line-oriented input mode (see note for-Loption) and only after file names listed on the command line or from any file supplied using the-Loption. When this option is enabled, the options-f,-o, and--totalsare ignored. This option is quite esoteric and is disabled by default. ๐--filter-terminator=<string>โ Specifies a<string>to print to standard output following the tags for each file name parsed when the--filteroption is enabled. This may permit an application reading the output ofctagsto determine when the output for each file is finished. ๐
Note that if the file name read is a directory and --recurse is enabled, this string will be printed only once at the end of all tags found for by descending the directory. This string will always be separated from the last tag line for the file by its terminating newline. ๐
This option is quite esoteric and is empty by default. ๐ซง
--links[=(yes|no)]โ Indicates whether symbolic links (if supported) should be followed. When disabled, symbolic links are ignored. This option is on by default. ๐--maxdepth=<N>โ Limits the depth of directory recursion enabled with the--recurse(-R) option. ๐ณ๏ธ--recurse[=(yes|no)]โ Recurse into directories encountered in the list of supplied files. ๐ณ
If the list of supplied files is empty and no file list is specified with the -L option, then the current directory (i.e. '.') is assumed. Symbolic links are followed by default (See --links option). If you don't like these behaviors, either explicitly specify the files or pipe the output of find(1) into ctags -L - instead. See, also, the --exclude and --maxdepth to limit recursion. ๐ฒ
Note: This option is not supported on all platforms at present. It is available if the output of the --help option includes this option. โ ๏ธ
-Rโ Equivalent to--recurse. ๐-L <file>โ Read from<file>a list of file names for which tags should be generated. ๐
If file is specified as '-', then file names are read from standard input. File names read using this option are processed following file names appearing on the command line. Options are also accepted in this input. If this option is specified more than once, only the last will apply. ๐
Note: file is read in line-oriented mode, where a new line is the only delimiter and non-trailing white space is considered significant, in order that file names containing spaces may be supplied (however, trailing white space is stripped from lines); this can affect how options are parsed if included in the input. ๐
--append[=(yes|no)]โ tells ctags whether the tags it just made from the files you named should be appended onto whatever's already chilling in the tag file, or whether they should straight up replace it. Default? It'snobestie. ๐ซถ-aโ literally just--append. Same energy. โจ-f <tagfile>โ use the name given by<tagfile>as your tag file. (Default istags, orTAGSwhen you're running in etags mode.) And if<tagfile>is-, then the tags get written to standard output instead. ๐
Now here's the part where ctags is a protective icon and honestly we love her for it: ctags will stubbornly refuse to take orders if tagfile already exists and its first line contains anything other than a valid tags line. This is literally saving your neck if you accidentally type ctags -f *.c, which would otherwise overwrite your first C file with the tags generated by all the rest! ๐ญ She'll also refuse a multi-character file name that begins with a - (dash) character, because that most likely means you left out the tag file name and this option tried to grab the next option as the file name. If you really, truly want to name your output tag file -ugly, specify it as -f ./-ugly. ๐
This option must appear before the first file name. If you specify it more than once, only the last one applies.
-o <tagfile>โ equivalent to-f tagfile. ๐
โจ Output Format Options โจ
--format=(1|2)โ changes the format of the output tag file. Right now the only valid values for level are1or2. Level1is the OG tag file format, and level2is a new extended format that carries extension fields (but in a way that stays backward-compatible with originalvi(1)implementations). Default level is2. [Ignored in etags mode] ๐ฆ--output-format=(u-ctags|e-ctags|etags|xref|json)โ picks the output format, bestie. Default isu-ctags. Peeptags(5)for the deets onu-ctagsande-ctags. TheTAG_OUTPUT_MODEpseudo tag tells you which one got chosen,u-ctagsore-ctags. Seectags-client-tools(7)for more about the pseudo tag. ๐
See -e for etags, and -x for xref. The json format is only available if the ctags executable was built with libjansson. See ctags-json-output(5) for more about json format. ๐ธ
See also --list-output-formats. โญ
-eโ same as--output-format=etags. Turns on etags mode, which makes a tag file for use with the Emacs editor. Alternatively, if ctags is invoked by a name containing the stringetags(either by renaming the executable or creating a link to it), etags mode gets enabled automatically. ๐ฅ-xโ same as--output-format=xref. Prints a tabular, human-readable cross reference (xref) file to standard output instead of generating a tag file. What's in the output? The tag name; the kind of tag; the line number, file name, and source line (with extra white space condensed) of the file that defines the tag. No tag file is written and all options affecting tag file output will be ignored. ๐
Example applications for this feature are generating a listing of all functions located in a source file (e.g. ctags -x --kinds-c=f file), or generating a list of all externally visible global variables located in a source file (e.g. ctags -x --kinds-c=v --extras=-F file). ๐
--sort=(yes|no|foldcase)โ says whether the tag file should be sorted on the tag name (default isyes). Note that the originalvi(1)required sorted tags. Thefoldcasevalue means case insensitive (or case-folded) sorting. Fast binary searches of tag files sorted with case-folding will need special support from tools using tag files โ like the support found in the ctagsreadtagslibrary, or Vim version 6.2 or higher (usingset ignorecase). [Ignored in etags mode] ๐ง-uโ equivalent to--sort=no(i.e. "unsorted"). ๐--etags-include=<file>โ includes a reference to<file>in the tag file. You can specify this option as many times as you want. It supports Emacs' ability to use a tag file that includes other tag files. [Available only in etags mode] ๐--input-encoding=<encoding>โ specifies the<encoding>of the input files. If you use this option, Universal Ctags converts the input from this encoding to the encoding specified by--output-encoding=encoding. ๐--input-encoding-<LANG>=<encoding>โ specifies a specific input<encoding>for<LANG>. It overrides the global default value given with--input-encoding. ๐--output-encoding=<encoding>โ specifies the<encoding>of the tags file. Universal Ctags converts the encoding of input files from the encoding specified by--input-encoding=<encoding>to this encoding. ๐
On top of that, <encoding> is specified at the top of the tags file as the value for the TAG_FILE_ENCODING pseudo-tag. The default value of <encoding> is UTF-8. โจ
๐ Language Selection and Mapping Options ๐
--language-force=(<language>|auto)โ by default, ctags automatically picks the language of a source file, ignoring those files whose language it can't figure out (see "Determining file language"). This option forces the specified language (case-insensitive; either built-in or user-defined) to be used for every supplied file instead of auto-selecting the language based on its extension. ๐
Also, the special value auto means the language should be automatically selected (which effectively disables this option). ๐ฆ
--languages=[+|-](<list>|all)โ specifies the languages for which tag generation is enabled, where<list>is a comma-separated list of language names (case-insensitive; either built-in or user-defined). ๐
If the first language of <list> isn't preceded by either a + or -, the current list (the current settings of enabled/disabled languages managed internally in ctags) gets cleared before adding or removing the languages in <list>. Until a - is encountered, each language in the <list> gets added to the current list. ๐ฅ
As either the + or - is encountered in the <list>, the languages following it get added or removed from the current list, respectively. So it becomes super simple to replace the current list with a new one, or to add/remove languages from the current list. โญ
The actual list of files for which tags will be generated depends on the language extension mapping in effect (see the --langmap option). Note that most languages, including user-defined languages, are enabled unless explicitly disabled using this option. Language names in the list may be any built-in language or one previously defined with --langdef. ๐
The default is all, which is also accepted as a valid argument. See the --list-languages option for a list of all (built-in and user-defined) language names. ๐ธ
Note: the --languages= option works in a cumulative way; the option can be specified with different arguments multiple times on a command line. ๐
--alias-<LANG>=[+|-](<pattern>|default)โ adds (+) or removes (-) an alias<pattern>to a language specified with<LANG>. ctags refers to the alias pattern during the "Determining file language" stage. ๐ง
The parameter <pattern> is not a list. Use this option multiple times on a command line to add or remove multiple alias patterns. ๐
To restore the default language aliases, specify default. โจ
Using all for <LANG> has meaning in the following two cases: ๐
--alias-all=โ this clears the aliases setting of all languages. ๐--alias-all=defaultโ this restores the default language aliases for all languages. ๐
--guess-language-eagerlyโ looks into the file contents to heuristically guess the proper language parser. See "Determining file language". ๐-Gโ equivalent to--guess-language-eagerly. ๐ซถ--langmap=<map>[,<map>[...]]โ controls how file names get mapped to languages (see the--list-mapsoption). Each comma-separated<map>is made of the language name (either a built-in or user-defined language), a colon, and a list of file extensions and/or file name patterns. A file extension is specified by putting a period before the extension (e.g..c). A file name pattern is specified by wrapping the pattern in parentheses (e.g.([Mm]akefile)). ๐
If appropriate support is available from the runtime library of your C compiler, then the file name pattern may contain the usual shell wildcards common on Unix (be sure to quote the option parameter to protect the wildcards from being expanded by the shell before being passed to ctags). You can find out if shell wildcards are available on your platform by checking the output of the --list-features option, which will include wildcards in the compiled feature list; otherwise, the file name patterns are matched against file names using a simple textual comparison. ๐
When mapping a file extension with the --langmap option, it will first be unmapped from any other languages. (The --map-<LANG> option gives more fine-grained control.) ๐
If the first character in a <map> is a plus sign (+), then the extensions and file name patterns in that map get appended to the current map for that language; otherwise, the map replaces the current map. For example, to specify that only files with extensions of .c and .x are treated as C language files, use --langmap=c:.c.x; to also add files with extensions of .j as Java language files, specify --langmap=c:.c.x,java:+.j. To map makefiles (e.g. files named either Makefile, makefile, or having the extension .mak) to a language called make, specify --langmap=make:([Mm]akefile).mak. To map files having no extension, specify a period not followed by a non-period character (e.g. ., ..x, .x.). ๐ฅ
To clear the mapping for a particular language โ like, fully stop ctags from auto-generating tags for it โ you just hand it an empty extension list, e.g. --langmap=fortran: ๐
. Wanna get the default language mappings back for one specific language? Pass the keyword default for that mapping. And if you want the defaults restored for all the languages at once, that's --langmap=default โจ.
Heads up bestie ๐ซถ: file name patterns get tested before file extensions when ctags is working out what language a file is. Universal Ctags does this in a different order than Exuberant Ctags does, so if it feels off, it's not a you problem. Peep ctags-incompatibilities(7) for the whole backstory on this incompatible change.
--map-<LANG>=[+|-]<extension>|<pattern>โ this is your fine-grained, precision-instrument way to control how file names map to languages, way more dialed-in than the--langmapoption ๐.
Okay so in ctags, more than one language can map to a single file name <pattern> or file <extension> (that's an N:1 map). The --langmap option, on the other hand, only handles 1:1 maps โ literally one language mapping to one file name <pattern> or file <extension>. A classic N:1 map? C++ and ObjectiveC, both of which map to .h as a file extension ๐.
How you spell stuff:
- a file extension gets a period in front of it, e.g.
.c - a file name pattern gets wrapped in parentheses, e.g.
([Mm]akefile) - a prefixed plus (
+) sign is for adding, and a minus (-) is for removing - no prefix at all means you're replacing the map of
<LANG>
Unlike --langmap, <extension> (or <pattern>) is not a list. --map-<LANG> takes exactly one extension (or pattern). But don't stress โ you can pass this option multiple times on the same command line with different arguments ๐.
โจ Tags File Contents Options โจ
Go read the TAG ENTRIES section for the tea on fields, kinds, roles, and extras ๐.
--excmd=(number|pattern|mix|combine)โ picks what kind of EX command ctags uses to locate tags in your source file.[Ignored in etags mode]
The valid values for type (either the whole word or just the first letter is accepted, you do you) are:
numberโ use only line numbers in the tag file to locate tags. This has four advantages, and they're lowkey great:- Significantly reduces the size of the resulting tag file.
- Eliminates failures to find tags because the line defining the tag has changed, causing the pattern match to fail (note that some editors, such as vim, are able to recover in many such instances).
- Eliminates finding identical matching, but incorrect, source lines (see BUGS).
- Retains separate entries in the tag file for lines which are identical in content. In pattern mode, duplicate entries are dropped because the search patterns they generate are identical, making the duplicate entries useless.
However โ and this is the big drawback, so listen up ๐ญ โ changes to the source files can cause the line numbers recorded in the tag file to no longer correspond to the lines in the source file, which means jumps to some tags miss the target definition by one or more lines. Basically: this option is best when the source code you're pointing it at isn't going to change. Selecting this option type causes the following options to be ignored: -B, -F.
numbertype is ignored in Xref and JSON output formats. Use--_xformat="...%n"for Xref output format, or--fields=+n-Pfor JSON output format. ๐
patternโ use only search patterns for all tags, rather than the line numbers usually used for macro definitions. The win here: you're not referencing obsolete line numbers when lines have been added or removed since the tag file was generated ๐ธ.mixedโ in this mode, patterns are generally used, with an exception (or a few). For Fortran, line numbers are used for common blocks, because their corresponding source lines are generally identical, which makes pattern searches useless for finding all the matches.
Exuberant Ctags has one more exception; for C, line numbers are used for macro definition tags. Universal Ctags doesn't have this exception for C.
This was the default format generated by the original ctags and is, therefore, retained as the default for this option โจ.
combineโ concatenate the line number and pattern with a semicolon in between.
-nโ equivalent to--excmd=number.-Nโ equivalent to--excmd=pattern.--extras=[+|-][<flags>|*]โ specifies whether to include extra tag entries for certain kinds of information. See also the Extras subsection to know what extras actually are ๐.
The parameter <flags> is a set of one-letter flags (and/or long-name flags), each one representing a single kind of extra tag entry to include in the tag file. If flags is preceded by either the + or - character, the effect of each flag is added to or removed from whatever's currently enabled; otherwise the flags replace any current settings. All entries are included if * is given.
This --extras= option is for controlling extras that are common across all languages (or language-independent extras). Universal Ctags also supports language-specific extras โ see Language-specific fields and extras for the concept. Use the --extras-<LANG>= option for controlling those ๐ฆ.
--extras-(<LANG>|all)=[+|-][<flags>|*]โ specifies whether to include extra tag entries for certain kinds of information, for language<LANG>. Universal Ctags introduces language-specific extras, so peep Language-specific fields and extras for the concept. This option is the one controlling them.
Pass all as <LANG> to apply the parameter <flags> to every language; all extras are enabled by specifying * as the parameter flags. If you specify nothing as the parameter flags (--extras-all=), all extras are disabled. These two combos are handy for testing ๐ง.
Check the output of the --list-extras=<LANG> option for the extras of a specific language <LANG>.
--fields=[+|-][<flags>|*]โ specifies which language-independent fields get included in the tag entries. Language-independent fields are extension fields that are common in all languages. See the TAG FILE FORMAT section, and the Extension fields subsection, for the details on extension fields ๐.
The parameter <flags> is a set of one-letter or long-name flags, each one representing a type of extension field to include. Each flag or group of flags may be preceded by either + to add it to the default set, or - to exclude it. With no preceding + or - sign at all, only those fields explicitly listed in flags will be included in the output (i.e. you're overriding the default set). All fields are included if * is given.
This option is ignored if the option --format=1 (legacy tag file format) has been specified โ ๏ธ.
Use the --fields-<LANG>= option for controlling language-specific fields.
--fields-(<LANG>|all)=[+|-][<flags>|*]โ specifies which language-specific fields get included in the tag entries. Universal Ctags supports language-specific fields โ see Language-specific fields and extras for the concept โจ.
Pass all as <LANG> to apply the parameter <flags> to every language; all fields are enabled by specifying * as the parameter flags. If you specify nothing as the parameter <flags> (i.e. --fields-all=), all fields are disabled. These two combos are useful for testing ๐
.
See the description of --fields=[+|-][<flags>|*] for what <flags> does.
Use the --fields= option for controlling language-independent fields.
--kinds-(<LANG>|all)=[+|-](<kinds>|*)โ specifies a list of language-specific<kinds>of tags (yes, kinds) to include in the output file for a particular language, where<LANG>is case-insensitive and is one of the built-in language names (run the--list-languagesoption for the complete list, bestie) ๐.
The parameter <kinds> is a group of one-letter or long-name flags designating kinds of tags (particular to that language) to either include or exclude from the output. The specific sets of flags recognized for each language, their meanings, and their defaults can all be listed using the --list-kinds-full option.
Each letter or group of letters may be preceded by either + to add it to, or - to remove it from, the default set. With no preceding + or - sign, only those kinds explicitly listed in kinds will be included in the output (i.e. overriding the default for the specified language).
Specify * as the parameter to include all kinds implemented in <LANG> in the output. And if all is given as <LANG>, specifying the parameter kinds affects all languages defined in ctags. Giving all only makes sense when * or F is given as the parameter kinds ๐.
Example time, for the C language: to add prototypes and external variable declarations to the default set of tag kinds but exclude macros, use --kinds-c=+px-d; to include only tags for functions, use --kinds-c=f. Slay ๐.
Some kinds of the C and C++ languages are synchronized โ enabling (or disabling) a kind in one language enables the kind having the same one-letter and long-name in the other language. See also the description of the MASTER column of --list-kinds-full.
--pattern-length-limit=<N>โ truncate patterns of tag entries after<N>characters. Disable it by setting to0(default is96).
An input source file with long lines and multiple tag matches per line can generate an excessively large tags file when the pattern length is unconstrained. For example, running ctags on a minified JavaScript source file often exhibits this behavior ๐ญ.
okay so the whole point of this truncation situation is that we never slice a UTF-8 code point right down the middle. Because those little guys can span multiple bytes, and cutting one in half means you'd be writing invalid byte sequences out of perfectly valid input files, which is <em>not</em> the serve. So the handling lets you sneak up to 3 extra bytes over the configured limit in the worst case โ specifically when a 4-byte code point starts right before the limit. ๐ซ
And ngl, bestie, this handling is fairly naive and fast, and even though it's resistant against any input, it still needs valid input to work properly. It is not guaranteed to behave the way you expect when the input is partially invalid UTF-8. It also partially affects non-UTF-8 input, if the byte sequence sitting at the truncation length happens to look like a multibyte UTF-8 sequence. That should be rare though, and in the worst case it'll just mean up to 3 extra bytes above the limit. โจ
--pseudo-tags=[+|-](<pseudo-tag>|*)โ turns emitting the pseudo-tag named<pseudo-tag>on or off ๐ซ. Give it'*'and you're enabling/disabling every single pseudo-tag.--put-field-prefixโ slapsUCTAGSon as a prefix for the names of fields that are new in Universal Ctags ๐ท๏ธ.
So some fields are freshly introduced in Universal Ctags (and more are coming, periodt), and other tags generators might introduce their own specific fields too. That's a whole conflicting-field-names situation โ mixing tags files generated by multiple tags generators (Universal Ctags included) gets messy. This option is the workaround for exactly that ๐ซถ:
$ ctags --fields='{line}{end}' -o - hello.c
main hello.c /^main(int argc, char **argv)$/;" f line:3 end:6
$ ctags --put-field-prefix --fields='{line}{end}' -o - hello.c
main hello.c /^main(int argc, char **argv)$/;" f line:3 UCTAGSend:6
See how the prefix got put on the end field? That's the one newly introduced in Universal Ctags, bestie ๐
.
--roles-(<LANG>|all).(<kind>|*)=[+|-][<roles>|*]โ picks the list of kind-specific roles of tags to include in the output file for a particular language ๐.<kind>is the kind where the<roles>are defined, and<LANG>is the language where that kind is defined. Every role in<roles>has to be wrapped in braces (so like{system}for a role named "system").
Just like the --kinds-<LANG> option, '+' adds the role to the list and '-' removes it from the list. '*' means include <em>all</em> roles of the kind. And the option with no argument at all makes the list empty ๐ณ๏ธ.
For specifying a kind, either a one-letter flag <em>or</em> a long name flag surrounded by braces is acceptable (e.g. --roles-C.h=+{system}{local} or --roles-C.{header}=+{system}{local}). '*' can be used for <KIND> only when you're adding/removing all roles of all kinds in a language to/from the list (e.g. --roles-C.*=* or --roles-C.*=).
And all can be used for <LANG> only when adding/removing all roles of all kinds in <em>all</em> languages to/from the list (e.g. --roles-all.*=* or --roles-all.*=). ๐
--tag-relative=(yes|no|always|never)โ controls how the file paths get recorded in the tag file ๐. The default isyeswhen you're running in etags mode (peep the-eoption), andnootherwise.yesโ the file paths recorded in the tag file should be relative to the directory containing the tag file, unless the files you supplied on the command line were specified with absolute paths.noโ the file paths recorded in the tag file should be relative to the current directory, unless the files supplied on the command line were specified with absolute paths.alwaysโ the recorded file paths should be relative <em>even if</em> source file names are passed in with absolute paths.neverโ the recorded file paths should be absolute <em>even if</em> source file names are passed in with relative paths.
--use-slash-as-filename-separator[=(yes|no)]โ uses the slash ('/') character as the filename separator instead of the backslash ('\') character when printing theinput:field ๐ช. Default isyesfor the default"u-ctags"output format, andnofor all the other formats.
The TAG_OUTPUT_FILESEP pseudo tag represents the choice of filename separators made with this option. See also ctags-client-tools(7).
Heads up: this option is available on MS Windows only ๐ซก.
-Bโ use backward searching patterns (like?pattern?). [Ignored in etags mode] ๐-Fโ use forward searching patterns (like/pattern/) (default). [Ignored in etags mode] ๐
๐ Option File Options ๐
--options=<pathname>โ read additional options from a file or directory ๐.
ctags searches for <pathname> in the optlib path list first. If ctags can't find a file or directory in that list, it reads the file or directory at the <pathname> you specified.
If you hand it a file, that file should contain one option per line. If you hand it a directory, files suffixed with .ctags under it get read in alphabetical order ๐ค.
Special case alert ๐จ: if --options=NONE is specified as the <em>first</em> option on the command line, preloading is disabled โ that option kills the automatic reading of any configuration options from a file (see "FILES").
--options-maybe=<pathname>โ same as--options, but it doesn't throw an error if the file (or directory) you specified with<pathname>doesn't exist ๐.--optlib-dir=[+]<directory>โ adds an optlib<directory>to the optlib path list, or resets that list ๐๏ธ. See "Default optlib path list" for what the default elements of the optlib path list are.
๐ง optlib Options ๐ง
See ctags-optlib(7) for the details of each option.
--kinddef-<LANG>=<letter>,<name>,<description>โ defines a kind for<LANG>โ๏ธ. Do <em>not</em> get this confused with--kinds-<LANG>, bestie, they are not the same thing.--langdef=<name>โ defines a new user-defined language,<name>, to be parsed with regular expressions ๐งฌ.--mline-regex-<LANG>=/<line_pattern>/<name_pattern>/<kind-spec>/[<flags>]โ defines a multi-line regular expression for locating tags in a specific language ๐.--regex-<LANG>=/<line_pattern>/<name_pattern>/<kind-spec>/[<flags>]โ defines a single-line regular expression for locating tags in a specific language ๐.
๐ Language Specific Options ๐
--if0[=(yes|no)]โ this one's a preference for whether code inside an"#if 0"branch of a preprocessor conditional should be examined for non-macro tags (macro tags are <em>always</em> included, no debate) ๐ซฅ. Because the whole intent of that construct is to disable code, the default value of this option isno(disabled).
Careful though: this is only a <em>preference</em> and it does not guarantee that code within an "#if 0" branch gets skipped. Why? Because when preprocessor conditionals are too complex, the fall-back algorithm used to generate tags follows <em>all</em> the branches of a conditional. So yeah, it might still peek ๐.
--line-directives[=(yes|no)]โ says whether#linedirectives should be recognized ๐งต. These show up in the output of a preprocessor and they carry the line number, and possibly the file name, of the original source file(s) that the preprocessor output file was generated from. This option is off by default.
When you enable it, ctags will generate tag entries marked with the file names and line numbers of their locations in the <em>original</em> source file(s), instead of their actual locations in the preprocessor output ๐ฏ. The actual file names placed into the tag file will have the same leading path components as the preprocessor output file, since it's assumed the original source files are located relative to the preprocessor output file (unless, of course, the #line directive specifies an absolute path).
Note: this option is generally only useful when used together with the--excmd=number(-n) option. Also, you may have to use either the--langmapor--language-forceoption if the extension of the preprocessor output file isn't known to ctags ๐ค.
-D <macro>=<definition>โ defines a C preprocessor<macro>๐งช. This emulates the behavior of the corresponding gcc option. All types of macros are supported, including the ones with parameters and variable arguments. Stringification, token pasting and recursive macro expansion are also supported. This extends the function provided by the-Ioption. ๐ฅ-h (<list>|default)โ specifies a<list>of file extensions, separated by periods, which are to be interpreted as include (or header) files ๐. To indicate files that have no extension, use a period not followed by a non-period character (e.g..,..x,.x.).
This option only affects how the scoping of particular kinds of tags is interpreted โ like whether they're considered globally visible or visible only within the file they're defined in ๐. It does <em>not</em> map the extension to any particular language. Any tag located in a non-include file that can't be seen (e.g. linked to) from another file is considered to have file-limited (e.g. static) scope. No kind of tag appearing in an include file will be considered to have file-limited scope. Periodt.
If the first character in the list is '+', the extensions in the list get <em>appended</em> to the current list; otherwise the list <em>replaces</em> the current list ๐. See also the fileScope/F flag of the --extras option.
The default list is .h.H.hh.hpp.hxx.h++.inc.def. To restore the default list, specify "-h default" ๐.
Note: if an extension you supply to this option isn't already mapped to a particular language (see "Determining file language", above), you'll also need to use either the--map-<LANG>,--langmapor--language-forceoption ๐บ๏ธ.
-I <identifier-list>โ specifies an<identifier-list>of identifiers that are to be specially handled while parsing C and C++ source files ๐งท. This option exists specifically to handle special cases that pop up through the use of preprocessor macros. When the identifiers listed are simple identifiers, those identifiers will be ignored during parsing of the source files.
If an identifier has a '+' tacked on the end (like "-I FOO+"), ctags will also ignore any parenthesis-enclosed argument list that might come right after that identifier in your source files. Peep the "-I MODULE_VERSION+" example down below for the vibe. โจ
If two identifiers are separated with the '=' character (so like -I FOO=BAR), then the first identifier gets swapped out for the second one when parsing happens. The list of identifiers can come straight off the command line, or you can read it in from a separate file. Check the "-I CLASS=class" example below. ๐
If the first character of <identifier-list> is '@', '.', or a pathname separator ('/' or '\'), or if the first two characters spell out a drive letter (like C:), then <identifier-list> is read as a filename โ and ctags will pull the list of identifiers from it, one per input line. ๐
Otherwise, <identifier-list> is just a list of identifiers (or identifier pairs) to be specially handled, each one delimited by a comma or by white space โ and if you go the white-space route, quote the whole thing so it stays a single command line argument. ๐ซถ
You can stack multiple -I options. And if you wanna wipe the whole ignore list clean, just pass a single dash ('-') as the <identifier-list>.
This feature is a whole lifesaver when preprocessor macros are out here causing syntactic confusion just by existing. Fr fr, it's the best way to work around a bunch of problems caused by syntax-busting macros lurking in source files (see "CAVEATS"). Let's run some examples so it clicks. ๐
int foo ARGDECL4(void *, ptr, long int, nbytes)
In the example above, the macro ARGDECL4 would get misread as the function's name instead of the correct name foo. Specifying "-I ARGDECL4" gets you the correct behavior. Slay.
/* creates an RCS version string in module */
MODULE_VERSION("$Revision$")
Here the macro invocation looks way too much like a function definition, because it isn't followed by a semicolon (and honestly it could even be followed by a global variable definition that looks a whole lot like a K&R style function parameter declaration). This seeming function definition could possibly even make the rest of the file get skipped over while ctags tries to complete the definition. ๐ญ Specifying "-I MODULE_VERSION+" avoids that whole mess.
CLASS Example {
// your content here
};
This example uses CLASS as a preprocessor macro that expands to something different on each platform. Like, CLASS might be defined as class __declspec(dllexport) on Win32 platforms, and just plain class on UNIX. Normally the absence of the C++ keyword class would make the source file get parsed incorrectly. Correct behavior can be restored by specifying "-I CLASS=class". ๐
--param-<LANG>.<name>=<argument>โ sets a<LANG>specific parameter, aka a parameter that belongs to that<LANG>specifically. You can see all the available parameters with--list-params.
๐ฆ Listing Options ๐ฆ
--list-aliases[=(<language>|all)]โ lists the aliases for either the<language>you name or for all languages, then exits. If you skip the option argument,allis the default. These aliases are what get used when heuristically testing a language parser against a source file. ๐--list-excludesโ lists the current exclusion patterns used to exclude files.--list-extras[=(<language>|NONE|all)]โ lists the extras recognized for either the<language>you name or for all languages. If you sayNONE, it lists only the extras that are common to all languages. (Peep the "Extras" subsection to find out what extras even are.)allis the default value when the option argument is omitted.
You can turn an extra on or off with --extras= for common extras across all languages, or --extras-<LANG>= for a specific language. These options take a one-letter flag or a long-name flag as the parameter that picks out the extra.
The columns in the output mean this:
LETTERโ one-letter flag. A'-'means this extra doesn't have a one-letter flag.NAMEโ long-name flag. The long-name is what gets used in the extras field.ENABLEDโ whether the extra is enabled or not. It's eitheryesorno.LANGUAGEโ the name of the language, if the extra is owned by a parser.NONEmeans the extra is common across parsers.DESCRIPTIONโ human readable description of the extra.
--list-featuresโ lists the compiled features.--list-fields[=(<language>|NONE|all)]โ lists the fields recognized for either the<language>you name or for all languages. If you sayNONE, it lists only the fields common to all languages. (See the "Extension fields" subsection to find out what fields are.)allis the default value if you leave the option argument off.
The columns mean this:
LETTERโ one-letter flag. A'-'means the field has no one-letter flag.NAMEโ long-name of the field.ENABLEDโ whether the field is enabled or not. It's eitheryesorno.LANGUAGEโ the name of the language if the field is owned by a parser.NONEmeans the field is a language-independent field that's common in all languages.JSTYPEโ JSON type used when printing the field's value when--output-format=jsonis specified. Seectags-client-tools(7).FIXEDโ whether this field can be disabled or not in tags output.
Some fields are printed always in tags output. Those have yes as the value in this column.
Unlike the tag output mode, the JSON output mode lets you disable any fields. ๐
OPโ how this field can be accessed from optscript code. This field is for Universal Ctags developers.DESCRIPTIONโ human readable description of the field.
--list-kinds[=(<language>|all)]โ a subset of--list-kinds-full. This option is kept around for backward-compatibility with Exuberant Ctags.
It prints only the LETTER, DESCRIPTION, and ENABLED fields of the --list-kinds-full output. But heads up, the presentation of the ENABLED column is different from --list-kinds-full โ [off] follows after the description if the kind is disabled, and nothing follows if it's enabled. The most of all kinds are enabled by default.
The critical weakness of this option is that it does not print the name of the kind. Universal Ctags introduced --list-kinds-full because it considers names to be important. ๐
This option does not work with --machinable nor --with-list-header.
--list-kinds-full[=(<language>|all)]โ lists the tag kinds recognized for either the<language>you name or for all languages, then exits. (See the "Kinds" subsection to learn what kinds are.)allis the default value if you leave the option argument off.
Each kind of tag recorded in the tag file is represented by a one-letter flag, or a long-name flag. They're also what you use to filter the tags placed into the output through the --kinds-<LANG> option.
The columns mean this:
LANGUAGEโ the name of the language that has the kind.LETTERโ one-letter flag. This has to be unique within a language.NAMEโ the long-name flag of the kind. You can use this as an alternative to the one-letter flag described above. If you enable theKfield with--fields=+K, ctags uses long-names instead of one-letters in tags output. To enable/disable a kind with the--kinds-<LANG>option, use the long-name surrounded by braces instead of the one-letter. See "Letters and names" for the deets. This also has to be unique within a language.ENABLEDโ whether the kind is enabled or not. It's eitheryesorno.REFONLYโ whether the kind is specialized for reference tagging or not. If this column isyes, the kind is for reference tagging and it is never used for definition tagging. See also "TAG ENTRIES".NROLESโ the number of roles this kind has. See also "Roles".MASTERโ the master parser controlling enablement of the kind. A kind belongs to a language (owner) in Universal Ctags; enabling and disabling a kind in one language has no effect on a kind in another language, even if both kinds have the same one-letter flag and/or the same long-name flag. In other words, the namespace of kinds are separated by language.
However, Exuberant Ctags does not separate the kinds of C and C++. Enabling/disabling kindX in the C language enables/disables a kind in the C++ language that has the same long-name flag as kindX. To emulate this behavior in Universal Ctags, a concept named master parser was introduced. Enabling/disabling some kinds are synchronized under the control of a master language. ๐ง
$ ctags --kinds-C=+'{local}' --list-kinds-full \
| grep -E '^(#|C\+\+ .* local)'
#LANGUAGE LETTER NAME ENABLED REFONLY NROLES MASTER DESCRIPTION
C++ l local yes no 0 C local variables
$ ctags --kinds-C=-'{local}' --list-kinds-full \
| grep -E '^(#|C\+\+ .* local)'
#LANGUAGE LETTER NAME ENABLED REFONLY NROLES MASTER DESCRIPTION
C++ l local no no 0 C local variables
You see the ENABLED field of the local kind of the C++ language is changed, though it was the local kind of the C language that got enabled/disabled. If you swap the languages, you see the same result. ๐
DESCRIPTIONโ human readable description for the kind.
--list-languagesโ spits out the names of every language ctags knows about, then dips out (exits). These language names are case insensitive and you can use them in a whole bunch of other options like--language-force,--languages,--kinds-<LANG>,--regex-<LANG>, and so on. iykyk ๐
Okay important: each language listed is disabled if it's followed by [disabled]. To actually use the parser for one of those sad disabled languages, you pass the language as an argument to the --languages=+ option. ๐ซถ
Also --machinable and --with-list-header options are ignored if you specify them with this option. no cap.
--list-map-extensions[=(<language>|all)]โ lists the file extensions that associate a file name with a language, either for the<language>you picked or for all languages, then exits. If you omit the option argument,allis used as the default value. โจ--list-map-patterns[=(<language>|all)]โ same vibe but for the file name patterns that associate a file name with a language, for either the specified<language>or all languages, and then exits.allis the default value if you skip the option argument. ๐ธ--list-maps[=(<language>|all)]โ lists both file name patterns and the file extensions that associate a file name with a language, for either the specified<language>or all languages, then exits.allis the default value if the option argument is omitted. ๐
Wanna list the file extensions or file name patterns separately? Use --list-map-extensions or --list-map-patterns instead. Also peep the --langmap option, and "Determining file language", above. ๐
Heads up bestie: this option does not work with--machinablenor--with-list-header.
--list-mline-regex-flagsโ outputs a list of flags that can be used in a multiline regex parser definition. Seectags-optlib(7). ๐ฆ--list-output-formatsโ lists the output formats you can use in the--output-formatoption. ๐ฅ
The NULLTAG column represetns whether the format supports null tags or not. See nulltag/z in "Extras" about the null tags.
(since verison 6.2.0)
--list-params[=(<language>|all)]โ lists the parameters for either the specified<language>or all languages, then exits.allis the default value if the option argument is omitted. โจ--list-pseudo-tagsโ outputs a list of pseudo-tags. that's it, that's the tweet. ๐--list-regex-flagsโ lists the flags that can be used in the--regex-<LANG>option. Seectags-optlib(7). ๐--list-roles[=(<language>|all)[.(<kind-specs>|*)]โ lists the roles for either the specified<language>or all languages.allis the default value if the option argument is omitted. ๐
If the parameter <kindspecs> is given after the parameter <language> or all with concatenating with ., it lists only roles defined in the kinds. Both one-letter flags and long name flags surrounded by braces are acceptable as the parameter <kindspecs>. ๐
The meaning of columns is as follows:
LANGUAGEโ the name of language having the role.KIND(L/N)โ the one-letter flag and the long-name flag of kind having the role.NAMEโ the long-name flag of the role.ENABLEDโ whether the kind is enabled or not. It takesyesorno.DESCRIPTIONโ human readable description for the role.
--list-subparsers[=(<baselang>|all)]โ lists the subparsers for a base language, for either the specified<baselang>or all languages, and then exits.allis the default value if the option argument is omitted. ๐ง--machinable[=(yes|no)]โ use a tab character as separators for--list-option output. It may be suitable for scripting. See "List options" for considered use cases. Disabled by default. โญ--with-list-header[=(yes|no)]โ print headers describing columns in--list-option output. See also "List options". ๐
๐ ๏ธ Miscellaneous Options
the grab-bag section bestie, everything else lives here ๐ซถ
--helpโ prints to standard output a detailed usage description, and then exits. ๐-?โ equivalent to--help.--help-fullโ prints to standard output a detailed usage description including experimental features, and then exits. Visit <https://docs.ctags.io/> for information about the latest exciting experimental features. ๐ฅ--licenseโ prints a summary of the software license to standard output, and then exits. (yes we love legal paperwork ๐ )--print-languageโ just prints the language parsers for specified source files, and then exits. no editing, no tagging, just receipts. ๐ธ--quiet[=(yes|no)]โ write fewer messages (default isno). ๐คซ--totals[=(yes|no|extra)]โ prints statistics about the source files read and the tag file written during the current invocation of ctags. This option isnoby default. ๐
The extra value prints parser specific statistics for parsers gathering such information. lowkey obsessed with the extra tea.
--verbose[=(yes|no)]โ enable verbose mode. This prints out information on option processing and a brief message describing what action is being taken for each file considered by ctags. Normally, ctags does not read command line arguments until after options are read from the configuration files (see "FILES", below). However, if this option is the first argument on the command line, it will take effect before any options are read from these sources. The default isno. ๐ฃ๏ธ-Vโ equivalent to--verbose.--version[=<language>|NONE]โ prints a version identifier for ctags to standard output, and then exits. This is guaranteed to always contain the string"Universal Ctags". See also the description forTAG_PROGRAM_VERSIONandTAG_OUTPUT_VERSIONinctags-client-tools(7). ๐
If NONE is given, prints the version identifier in a simplified way.
If <language> is given, print the version identifier for the parser for <language>. See also the description for TAG_PARSER_VERSION in ctags-client-tools(7). โจ
๐ฐ๏ธ Obsoleted Options
these options are kept for backward-compatibility with Exuberant Ctags. they're giving vintage, not vibes. ๐
-wโ this option is silently ignored for backward-compatibility with the ctags of SVR4 Unix. not a peep, not a whisper. ๐--file-scope[=(yes|no)]โ this options is removed. Use--extras=[+|-]For--extras=[+|-]{fileScope}instead.--extra=[+|-][<flags>|*]โ equivalent to--extras=[+|-][<flags>|*], which was introduced to make the option naming convention align to the other options like--kinds-<LANG>=and--fields=. ๐--<LANG>-kinds=[+|-](<kinds>|*)โ this option is obsolete. Use--kinds-<LANG>=...instead.
โจ OPERATIONAL DETAILS โจ
okay so here's the tea on how ctags actually does its thing ๐ซถ As it considers each source file name in turn, it tries to figure out the language of that file by running the tests described down in "Determining file language".
If a language was identified, the file gets opened and then the appropriate language parser is called to operate on the currently open file. The parser parses through the file and adds an entry to the tag file for each language object it is written to handle. Peep "TAG FILE FORMAT", below, for the deets on those entries. ๐
๐ Notes for C/C++ Parser
This implementation of ctags imposes no formatting requirements on C code, unlike those legacy implementations. Older ctags versions lowkey relied on certain formatting assumptions to help resolve coding dilemmas caused by preprocessor conditionals. not us though ๐
In general, ctags tries to be smart about conditional preprocessor directives. If a preprocessor conditional is encountered within a statement which defines a tag, ctags follows only the first branch of that conditional (except in the special case of #if 0, in which case it follows only the last branch). The reason for this? Failing to pursue only one branch can result in ambiguous syntax, as in this iconic little example:
#ifdef TWO_ALTERNATIVES
struct {
#else
union {
#endif
short a;
long b;
}
Both branches cannot be followed, or braces become unbalanced and ctags would be unable to make sense of the syntax. ๐ญ
If the application of this heuristic fails to properly parse a file โ generally because of complicated and inconsistent pairing within the conditionals โ ctags will retry the file using a different heuristic which does not selectively follow conditional preprocessor branches, but instead falls back to relying upon a closing brace ('}') in column 1 as indicating the end of a block once any brace imbalance results from following a #if conditional branch.
ctags will also try to specially handle arguments lists enclosed in double sets of parentheses in order to accept the following conditional construct:
extern void foo __ARGS((int one, char two));
Any name immediately preceding the '(' will be automatically ignored and the previous name will be used. ๐ง
C++ operator definitions are specially handled too. In order for consistency with all types of operators (overloaded and conversion), the operator name in the tag file will always be preceded by the string "operator " (i.e. even if the actual operator definition was written as "operator<<"). slay, consistency ๐
After creating or appending to the tag file, it is sorted by the tag name, removing identical tag lines.
๐ Determining file language
๐ File name mapping
Unless the --language-force option is specified, the language of each source file is automatically selected based upon a mapping of file names to languages. The mappings in effect for each language may be displayed using the --list-maps option and may be changed using the --langmap or --map-<LANG> options.
If the name of a file is not mapped to a language, ctags tries to heuristically guess the language for the file by inspecting its content. ๐
All files that have no file name mapping and no guessed parser are ignored. This permits running ctags on all files in either a single directory (e.g. "ctags *"), or on all files in an entire source directory tree (e.g. "ctags -R"), since only those files whose names are mapped to languages will be scanned.
An extension may be mapped to multiple parsers. For example, .h are mapped to C++, C and ObjectiveC. These mappings can cause issues. ๐ฌ ctags tries to select the proper parser for the source file by applying heuristics to its content, however it is not perfect. In case of issues one can use --language-force=<language>, --langmap=<map>[,<map>[...]], or the --map-<LANG>=[+|-]<extension>|<pattern> options. (Some of the heuristics are applied whether --guess-language-eagerly is given or not.)
๐ฆ Heuristically guessing
If ctags cannot select a parser from the mapping of file names, various heuristic tests are conducted to determine the language:
โจ template file name testing
If the file name has an .in extension, ctags applies the mapping to the file name without the extension. For example, config.h is tested for a file named config.h.in.
โจ "interpreter" testing
The first line of the file is checked to see if the file is a #! script for a recognized language. ctags looks for a parser having the same name.
If ctags finds no such parser, ctags looks for the name in alias lists. For example, consider if the first line is #!/bin/sh. Though ctags has a "shell" parser, it doesn't have a "sh" parser. However, sh is listed as an alias for shell, therefore ctags selects the "shell" parser for the file.
An exception is env. If env is specified (for example "#!/usr/bin/env python"), ctags reads more lines to find the real interpreter specification.
To display the list of aliases, use --list-aliases option. To add an item to the list or to remove an item from the list, use the --alias-<LANG>=+<pattern> or --alias-<LANG>=-<pattern> option respectively.
โจ "zsh autoload tag" testing
If the first line starts with #compdef or #autoload, ctags regards the line as "zsh".
โจ "emacs mode at the first line" testing
The Emacs editor has multiple editing modes specialized for programming languages. Emacs can recognize a marker called modeline in a file and utilize the marker for the mode selection. This heuristic test does the same as what Emacs does.
ctags treats MODE as a name of interpreter and applies the same rule of "interpreter" testing if the first line has one of the following patterns:
-*- mode: MODE -*-
or
-*- MODE -*-
โจ "emacs mode at the EOF" testing
Emacs editor recognizes another marker at the end of file as a mode specifier. This heuristic test does the same as what Emacs does.
ctags treats MODE as a name of an interpreter and applies the same rule of "interpreter" heuristic testing, if the lines at the tail of the file have the following pattern:
Local Variables:
...
mode: MODE
...
End:
3000 characters are sought from the end of file to find the pattern. bestie that's a whole 3000 characters of vibes ๐
โจ "vim modeline" testing
Like the modeline of the Emacs editor, Vim editor has the same concept. ctags treats TYPE as a name of interpreter and applies the same rule of "interpreter" heuristic testing if the first or last 5 lines of the file have one of the following patterns:
filetype=TYPE
or
ft=TYPE
โจ "PHP marker" testing
If the first line is started with <?php, ctags regards the line as "php".
Looking into the file contents is a more expensive operation than file name matching. So ctags runs the testings in limited conditions. "interpreter" testing is enabled only when a file is an executable or the --guess-language-eagerly (-G in short) option is given. The other heuristic tests are enabled only when -G option is given. ๐
The --print-language option can be used just to print the results of parser selections for given files instead of generating a tags file.
Examples:
$ ctags --print-language config.h.in input.m input.unknown
config.h.in: C++
input.m: MatLab
input.unknown: NONE
NONE means that ctags does not select any parser for the file.
๐ TAG FILE FORMAT ๐
This section describes the tag file format briefly. See tags(5) and ctags-client-tools(7) for more details.
When not running in etags mode, each entry in the tag file consists of a separate line, each looking like this, called regular tags, in the most general case:
<tag_name><TAB><file_name><TAB><ex_cmd>;"<TAB><extension_fields>
The fields and separators of these lines are specified as follows:
<tag_name>: tag name<TAB>: single tab character<file_name>: name of the file in which the object associated with the tag is located<TAB>: single tab character<ex_cmd>: EX command used to locate the tag within the file; generally a search pattern (either/pattern/or?pattern?) or line number (see--excmd=<type>option).;"<TAB><extension_fields>: a set of extension fields. See "Extension fields" for more details.
Tag file format 2 (see --format) extends the EX command to include the extension fields embedded in an EX comment immediately appended to the EX command, which leaves it backward-compatible with original vi(1) implementations.
A few special tags, called pseudo tags, are written into the tag file for internal purposes.
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
...
--pseudo-tags=[+|-](<pseudo-tag>|*) option enables or disables emitting pseudo-tags.
See the output of "ctags --list-pseudo-tags" for the list of the kinds. See also tags(5) and ctags-client-tools(7) for more details of the pseudo tags.
These tags are composed in such a way that they always sort to the top of the file. Therefore, the first two characters of these tags are used as a magic number to detect a tag file for purposes of determining whether a valid tag file is being overwritten rather than a source file. magic number behavior, iconic โจ
Note that the name of each source file will be recorded in the tag file exactly as it appears on the command line. Therefore, if the path you specified on the command line was relative to the current directory, then it will be recorded in that same manner in the tag file. See, however, the --tag-relative=(yes|no|always|never) option for how this behavior can be modified.
๐ TAG ENTRIES ๐
A tag is an index for a language object. The concept of a tag and related items in Exuberant Ctags are refined and extended in Universal Ctags.
A tag is categorized into definition tags or reference tags. In general, Exuberant Ctags only tags definitions of language objects: places where newly named language objects are introduced. Universal Ctags, on the other hand, can also tag references of language objects: places where named language objects are used. However, support for generating reference tags is new and limited to specific areas of specific languages in the current version. new and limited, no cap, that's just where we're at rn ๐
๐ง Extension fields
A tag can record various information, called extension fields.
Extension fields are these little tab-separated key-value pairs that get tacked onto the end of the EX command as a comment, exactly like we talked about above. They show up in the general shape key:value. ๐ซ
Plus, sometimes there's info about the scope of the tag definition hanging around, where the key part equals some language-dependent construct name and the value is the name declared for that construct in the program. This scope entry tells you the scope where the tag was found. So like, a tag made for a C structure member would have a scope looking like struct:myStruct. โจ
The --fields=[+|-][<flags>|*] and --fields-(<LANG>|all)=[+|-][<flags>|*] options say which available extension fields get included in the tag entries.
Go peep the output of ctags --list-fields for the full list of extension fields. The essential ones are name, input, pattern, and line. The meaning of the major fields goes like this (long-name flag/one-letter flag):
access/aโ shows the visibility of this class member, where the value is specific to the language.end/eโ the line number of the end lines of the language object.extras/Eโ extra tag type info. See "Extras" for the deets.file/fโ says the tag has file-limited visibility. This key has no corresponding value. Enabled by default.implementation/mโ when it's there, it signals a limited implementation (abstract vs. concrete) of a routine or class, where the value is specific to the language (virtualorpure virtualfor C++;abstractfor Java).inherits/iโ when it's there, the value is a comma-separated list of classes this class is derived from (i.e. inherits from).input/Fโ the name of the source file wherenameis defined or referenced.kโ Kind (see <Kinds>) of tag as one-letter. Enabled by default. This field has no long-name. See also thekind/zflag.Kโ Kind (see <Kinds>) of tag as long-name. This field has no long-name. See also thekind/zflag.kind/zโ include thekind:key in the kind field (see <Kinds>). See also thekandKflags.language/lโ language of the source file containing the tag.line/nโ the line number wherenameis defined or referenced ininput.name/Nโ the name of language objects.nth/oโ the order in the parent scope. (i.e. the 4th parameter in the function).pattern/Pโ can be used to search thenameininput.roles/rโ roles assigned to the tag. See "Roles" for more details.sโ Scope of tag definition. Enabled by default. This field has no long-name. See also thescope/Zflag.scope/Zโ prepend thescope:key to the scope (s) field. See also thesflag.scopeKind/pโ kind of scope as long-name.signature/Sโ when it's there, the value is a language-dependent representation of the signature of a routine (e.g. prototype or parameter list). A routine signature in its complete form specifies the return type of a routine and its formal argument list. This extension field is presently supported only for C-based languages and does not include the return type.typeref/tโ type and name of a variable, typedef, or return type of a callable like function, as atyperef:field. Enabled by default.
โจ Kinds โจ
So kind is a field that represents the kind of language object a tag is pointing at. Kinds used and defined are wildly different between parsers โ like, C language defines macro, function, variable, typedef, etc. ๐ฆ
The --kinds-(<LANG>|all)=[+|-](<kinds>|*) option specifies a list of language-specific kinds of tags (or kinds) to include in the output file for a particular language.
Check the output of ctags --list-kinds-full for the complete list of the kinds. ๐
Its value is either one of the corresponding one-letter flags or a long-name flag. It's permitted (and is, in fact, the default) for the key portion of this field to be omitted. The optional behaviors are controlled with the --fields option like this:
$ ctags -o - kinds.c
foo kinds.c /^int foo() {$/;" f typeref:typename:int
$ ctags --fields=+k -o - kinds.c
foo kinds.c /^int foo() {$/;" f typeref:typename:int
$ ctags --fields=+K -o - kinds.c
foo kinds.c /^int foo() {$/;" function typeref:typename:int
$ ctags --fields=+z -o - kinds.c
foo kinds.c /^int foo() {$/;" kind:f typeref:typename:int
$ ctags --fields=+zK -o - kinds.c
foo kinds.c /^int foo() {$/;" kind:function typeref:typename:int
๐ Roles ๐
Role is a newly introduced concept in Universal Ctags. Role is a concept associated with reference tags, and is not implemented widely yet. (baby concept, still growing ๐ซถ)
Like we said earlier in "Kinds", the kind field represents the type of language object a tag specifies โ function vs. variable, that vibe. Specific kinds are defined for reference tags, like the C++ kind header for header file, or Java kind package for package statements. For those reference kinds, a roles field can be added to distinguish the role of the reference kind. In other words: the kind field identifies the what of the language object, whereas the roles field identifies the how of a referenced language object. Roles are only used with specific kinds.
For a definition tag, this field takes def as a value.
So for example, Baz gets tagged as a reference tag with kind package and with role imported in the following code:
package Bar;
import Baz;
class Foo {
// ...
}
$ ctags --fields=+KEr -uo - roles.java
Bar roles.java /^package Bar;$/;" package roles:def
Foo roles.java /^class Foo {$/;" class roles:def
$ ctags --fields=+EKr --extras=+r -uo - roles.java
Bar roles.java /^package Bar;$/;" package roles:def
Baz roles.java /^import Baz;$/;" package roles:imported extras:reference
Foo roles.java /^class Foo {$/;" class roles:def
The --roles-(<LANG>|all).(<kind>|all)=[+|-][<roles>|*] option specifies a list of kind-specific roles of tags to include in the output file for a particular language.
Go ask the output of ctags --list-roles for the list of roles. ๐
๐ Extras ๐
Generally, ctags tags only language objects appearing in source files, as is. In other words, a value for a name: field should be found on the source file associated with the name:. An extra type tag (extra) is for tagging a language object with a processed name, or for tagging something not associated with a language object. A typical extra tag is qualified, which tags a language object with a class-qualified or scope-qualified name. โจ
The --extras-(<LANG>|all)=[+|-][<flags>|*] option specifies whether to include extra tag entries for certain kinds of information.
Go ask the output of ctags --list-extras for the list of extras. The meaning of the major extras goes like this (long-name flag/one-letter flag):
anonymous/noneโ include an entry for the language object that has no name, like a lambda function. This extra has no one-letter flag and is enabled by default.
The extra tag is useful as a placeholder to fill scope fields for language objects defined in a language object with no name.
struct {
double x, y;
} p = { .x = 0.0, .y = 0.0 };
x and y are the members of a structure. When filling the scope fields for them, ctags has trouble because the struct where x and y belong to has no name. For overcoming the trouble, ctags generates an anonymous extra tag for the struct and fills the scope fields with the name of the extra tag. ๐ญ
$ ctags --fields=-f -uo - input.c
__anon9f26d2460108 input.c /^struct {$/;" s
x input.c /^ double x, y;$/;" m struct:__anon9f26d2460108
y input.c /^ double x, y;$/;" m struct:__anon9f26d2460108
p input.c /^} p = { .x = 0.0, .y = 0.0 };$/;" v typeref:struct:__anon9f26d2460108
The above tag output has __anon9f26d2460108 as an anonymous extra tag. The typeref field of p also receives the benefit of it. ๐
fileScope/Fโ indicates whether tags scoped only for a single file (i.e. tags which cannot be seen outside of the file in which they are defined, such as language objects withstaticmodifier of C language) should be included in the output. See also the-hoption.
This extra tag is enabled by default. Add --extras=-F option not to output tags scoped only for a single-file. This is the replacement for --file-scope option of Exuberant Ctags.
static int f() {
return 0;
}
int g() {
return 0;
}
$ ctags -uo - filescope.c
f filescope.c /^static int f() {$/;" f typeref:typename:int file:
g filescope.c /^int g() {$/;" f typeref:typename:int
$ ctags --extras=-F -uo - filescope.c
g filescope.c /^int g() {$/;" f typeref:typename:int
inputFile/fโ include an entry for the base file name of every source file (e.g.example.c), which addresses the first line of the file. This flag is the replacement for--file-tagshidden option of Exuberant Ctags.
If the end: field is enabled, the end line number of the file can be attached to the tag. (However, ctags omits the end: field if no newline is in the file like an empty file.)
By default, ctags doesn't create the inputFile/f extra tag for the source file when ctags doesn't find a parser for it. Enabling Unknown parser with --languages=+Unknown forces ctags to create the extra tags for any source files.
The etags mode enables the Unknown parser implicitly.
nulltag/zโ include tags (null tags) having empty strings as their names. Generally speaking, trying to make a null tag is a sign of a parser bug or broken input. ctags warns such trying or throws the null tag away. To suppress the warnings, use--quietoption. ๐ญ
On the other hand, null tags are valid in some languages. Consider {"": val} in a JavaScript sourece code. The empty string is valid as a key. If a parser intentionally makes a null tag (a valid null tag), ctags doesn't warn but discard it by default.
The discards are happening because some output formats just do not vibe with null tags, bestie. It's not their fault, it's just their thing.
With nulltag/z extra, you can force ctags to emit the nulltags. This extra only hits if the output format supports null tags โ and if you wanna know which formats do, the --list-output-formats option tells you. ๐
(since version 6.2.0)
pseudo,pโ Include pseudo-tags. This one is enabled by default unless the tag file is being written to standard output. Curious about what pseudo-tags even are? Go readctags-client-tools(7), it spills the tea. ๐ซqualified,qโ Include an extra class-qualified or namespace-qualified tag entry for each tag that's a member of a class or a namespace.
This can make it way easier to find a specific tag when multiple occurrences of the same tag name are chilling in the tag file. But heads up: this could potentially more than double the size of your tag file. ๐ญ
What the qualified tag actually looks like depends on the language the tag came from โ ctags uses whatever form is most natural for how qualified calls work in that language. For C++ and Perl, it's in the form class::member; for Eiffel and Java, it's in the form class.member.
Note: PHP uses backslash characters as separators when forming qualified names. However, in the tags output of Universal Ctags, a backslash character in a name gets escaped with a backslash character. Peep tags(5) about the escaping. ๐ฆ
The following example demonstrates the qualified extra tag. โจ
class point {
double x;
};
For the above source file, ctags tags point and x by default. If the qualified extra is enabled from the command line (--extras=+q), then point.x is also tagged even though the string "point.x" is not in the source code. Wild, right?
$ ctags --fields=+K -uo - qualified.java
point qualified.java /^class point {$/;" class
x qualified.java /^ double x;$/;" field class:point
$ ctags --fields=+K --extras=+q -uo - qualified.java
point qualified.java /^class point {$/;" class
x qualified.java /^ double x;$/;" field class:point
point.x qualified.java /^ double x;$/;" field class:point
reference,rโ Include reference tags. Scroll to TAG ENTRIES for the whole story on reference tags.
Here's the reference extra tag in action, bestie:
#include <stdio.h>
#include "utils.h"
#define X
#undef X
The roles:system or roles:local fields get added depending on whether the include file name starts with '<' or not.
"#define X" emits a definition tag. On the other hand, "#undef X" emits a reference tag. They're giving opposites, honestly. ๐
$ ctags --fields=+EKr -uo - inc.c
X inc.c /^#define X$/;" macro file: roles:def extras:fileScope
$ ctags --fields=+EKr --extras=+r -uo - inc.c
stdio.h inc.c /^#include <stdio.h>/;" header roles:system extras:reference
utils.h inc.c /^#include "utils.h"/;" header roles:local extras:reference
X inc.c /^#define X$/;" macro file: roles:def extras:fileScope
X inc.c /^#undef X$/;" macro file: roles:undef extras:fileScope,reference
๐ Language-specific fields and extras ๐
Exuberant Ctags had this whole concept of fields and extras, and they're shared between parsers of different languages. Universal Ctags was like "and we can do better" and extended the concept by providing language-specific fields and extras. Iconic behavior, truly. ๐
๐ HOW TO USE WITH VI ๐
vi(1) will, by default, expect a tag file named tags in the current directory. Once the tag file is built, these commands are your besties for exercising the tag indexing feature:
vi -t tagโ Start vi and position the cursor at the file and line where tag is defined. ๐:ta tagโ Find a tag. ๐Ctrl-]โ Find the tag under the cursor.Ctrl-Tโ Return to previous location before jump to tag (this one is not widely implemented, so don't be surprised if it ghosts you).
๐ HOW TO USE WITH GNU EMACS ๐
emacs(1) will, by default, expect a tag file named TAGS in the current directory. Once the tag file is built, these commands exercise the tag indexing feature:
M-x visit-tags-table <RET> FILE <RET>โ Select the tag file, FILE, to use.M-. [TAG] <RET>โ Find the first definition of TAG. The default tag is the identifier under the cursor. โจM-*โ Pop back to where you previously invokedM-..C-u M-.โ Find the next definition for the last tag.
For more commands, see the Tags topic in the Emacs info document. ๐
๐ฆ HOW TO USE WITH NEDIT ๐ฆ
NEdit version 5.1 and later can handle the new extended tag file format (see --format).
- To make NEdit use the tag file, select
"File->Load Tags File". - To jump to the definition for a tag, highlight the word, then press
Ctrl-D.
NEdit 5.1 can read multiple tag files from different directories. Setting the X resource nedit.tagFile to the name of a tag file instructs NEdit to automatically load that tag file at startup time. ๐
๐ CAVEATS ๐
Okay bestie, listen up, because this part is important. Because ctags is neither a preprocessor nor a compiler, use of preprocessor macros can fool ctags into either missing tags or improperly generating inappropriate tags. Even though ctags has been designed to handle certain common cases, this is the single biggest cause of reported problems. In particular, the use of preprocessor constructs which alter the textual syntax of C can fool ctags. You can work around many such problems by using the -I option. ๐
Also note that since ctags generates patterns for locating tags (see the --excmd option), it's entirely possible that the wrong line may be found by your editor if there exists another source line which is identical to the line containing the tag. The following example demonstrates this condition:
int variable;
/* ... */
void foo(variable)
int variable;
{
/* ... */
}
Depending upon which editor you use and where in the code you happen to be, it's possible that the search pattern may locate the local parameter declaration before it finds the actual global variable definition, since the lines (and therefore their search patterns) are identical. It's giving chaos, honestly.
This can be avoided by use of the --excmd=n option. ๐
๐ INCOMPATIBLE CHANGES ๐
See ctags-incompatibilities(7) about incompatibilities between Universal Ctags and Exuberant Ctags.
This section describes major incompatibilities within versions of Universal Ctags.
๐ธ Unifying the kind Letter for unknown kinds ๐ธ
Some parsers used different kind letters for unknown kinds. EmacsLisp used u. Go used u. Julian used x. Lisp used u. Lua used X. and Python used x. They were unified to Y in the during development of version 5.9.x. Teamwork makes the dream work, periodt. โจ
๐ญ BUGS ๐ญ
ctags has more options than ls(1). And honestly? That's just the truth of it. ๐
ctags assumes the input file is written in the correct grammar. Otherwise output of ctags is undefined. In other words it has garbage in, garbage out (GIGO) feature. Not a bug, a lifestyle. ๐
When parsing a C++ member function definition (e.g. className::function), ctags cannot determine whether the scope specifier is a class name or a namespace specifier and always lists it as a class name in the scope portion of the extension fields. Also, if a C++ function is defined outside of the class declaration (the usual case), the access specification (i.e. public, protected, or private) and implementation information (e.g. virtual, pure virtual) contained in the function declaration are not known when the tag is generated for the function definition. It will, however be available for prototypes (e.g. --kinds-c++=+p). ๐ซ
No qualified tags are generated for language objects inherited into a class.
๐ ENVIRONMENT VARIABLES ๐
TMPDIRโ On Unix-like hosts wheremkstemp(3)is available, the value of this variable specifies the directory in which to place temporary files. This can be super useful if the size of a temporary file becomes too large to fit on the partition holding the default temporary directory defined at compilation time. ๐ญ
ctags creates temporary files only if either (1) an emacs-style tag file is being generated, (2) the tag file is being sent to standard output, or (3) the program was compiled to use an internal sort algorithm to sort the tag files instead of the sort(1) utility of the operating system. If the sort(1) utility of the operating system is being used, it will generally observe this variable also.
Note that if ctags is setuid, the value of TMPDIR will be ignored. ๐
๐ FILES ๐
๐ธ Output files ๐ธ
tagsโ the default tag file thatctagsmakes for you. iconic behavior honestly ๐TAGSโ the default tag file thatetagsmakes. different file, same vibe โจ
๐ Preloading option files ๐
okay so bestie, these are the config files that get preloaded:
$XDG_CONFIG_HOME/ctags/*.ctags, or$HOME/.config/ctags/*.ctagsif$XDG_CONFIG_HOMEis not defined$HOME/.ctags.d/*.ctags$HOMEDRIVE$HOMEPATH/ctags.d/*.ctags(on MS Windows only ๐ช).ctags.d/*.ctagsctags.d/*.ctags
If any of these configuration files exist, each will be expected to contain a set of default options which are read in the order listed when ctags starts, but before any command line options are read. so it's giving "set up your personal or project-level defaults" energy ๐ซถ
It is possible to compile ctags to read an additional configuration file before any of those shown above, and you'll know that's the case if the output produced by the --version option lists the custom-conf feature. sneaky extra file, iykyk ๐ฅ
Options appearing on the command line will override options specified in these files. Only options will be read from these files.
note that the option files are read in line-oriented mode in which spaces are significant (since shell quoting is not possible) but spaces at the beginning of a line are ignored. Each line of the file is read as one command line parameter (as if it were quoted with single quotes). Therefore, use new lines to indicate separate command-line arguments. ๐
A line starting with # is treated as a comment.
*.ctags files in a directory are loaded in alphabetical order. yes, alphabetically, it's very organized of them ๐ธ
๐ฆ Default optlib path list ๐ฆ
$XDG_CONFIG_HOME/ctags, or$HOME/.config/ctagsif$XDG_CONFIG_HOMEis not defined$HOME/.ctags.d$HOMEDRIVE$HOMEPATH/ctags.d(on MS Windows only)
These directories are parts of the optlib path list by default. See "Option File Options" about the optlib path list.
If you have a set of options that you want to enable conditionally, make a directory in the path in the optlib path list, and put the options to the files having .ctags as extensions under the directory. --options=<the-directory-name> is for enabling the options.
For example, consider you have some options you want to enable only when tagging the Linux kernel source tree ๐ง. In that case, make $HOME/.ctags.d/linux directory, put the options to $HOME/.ctags.d/linux/my.ctags. If you have many options, you can split them into multiple files like $HOME/.ctags.d/linux/device-driver.ctags and $HOME/.ctags.d/linux/network-stack.ctags. Either way, you can enable the options in the .ctags file(s) under the directory by adding --options=linux to your ctags command line. so clean, so modular, we love a modular queen ๐
๐ SEE ALSO ๐
- See
ctags-optlib(7)for defining (or extending) a parser in a configuration file. - See
tags(5)for the format of tag files. - See
ctags-incompatibilities(7)about known incompatible changes with Exuberant Ctags. - See
ctags-client-tools(7)if you are interested in writing a tool for processing tags files. - See
ctags-lang-python(7)about python input specific notes. ๐ - See
readtags(1)about a client tool for binary searching a name in a sorted tags file. - The official Universal Ctags web site at:
https://ctags.io/๐ - Also
ex(1),vi(1),elvis(1), or, better yet,vim(1), the official editor of ctags. For more information onvim(1), see the Vim web site at:https://www.vim.org/ - About the file format for TAGS, see emacs git
https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/ETAGS.EBNF.
๐ AUTHOR ๐
Universal Ctags project https://ctags.io/
Darren Hiebert <dhiebert@users.sourceforge.net> http://DarrenHiebert.com/
๐๏ธ MOTIVATION ๐๏ธ
"Think ye at all times of rendering some service to every member of the human race."
"All effort and exertion put forth by man from the fullness of his heart is worship, if it is prompted by the highest motives and the will to do service to humanity."
-- From the Baha'i Writings
no because why is a manpage being this profound ๐ญ๐ honestly? ate.
๐ CREDITS ๐
This version of ctags (Universal Ctags) derived from the repository, known as fishman-ctags, started by Reza Jelveh.
The fishman-ctags was derived from Exuberant Ctags.
Some parsers are taken from tagmanager of the Geany ( https://www.geany.org/ ) project.
Exuberant Ctags was originally derived from and inspired by the ctags program by Steve Kirkendall <kirkenda@cs.pdx.edu> that comes with the Elvis vi clone (though virtually none of the original code remains).
Credit is also due Bram Moolenaar <Bram@vim.org>, the author of vim, who has devoted so much of his time and energy both to developing the editor as a service to others, and to helping the orphans of Uganda. ๐ซถโจ
The section entitled "HOW TO USE WITH GNU EMACS" was shamelessly stolen from the info page for GNU etags. yes bestie, they said shamelessly, we respect the honesty ๐
and that's a wrap on the whole page!! ๐ this was the ctags(1) manual from Universal Ctags, version 6.2.1, and yeah that's literally the whole thing, every last file path and credit preserved with love ๐ go forth and tag everything, bestie ๐๐ฆ
๐ฆ where this page comes from
- alpine 3.24: ctags-doc 6.2.1-r0 ยท GPL-2.0-or-later
- fedora 43: ctags 6.2.1-1.fc43 ยท GPL-2.0-or-later
- fedora 44: ctags 6.2.1-3.fc44 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms