xref: /Universal-ctags/docs/news.rst (revision 94e964efcdb54004e666334f92f6bee597c7ab96)
1eb375513SMasatake YAMATO======================================================================
24afebce5SHiroo HAYASHIOther changes
3f439b71bSVitor Antunes======================================================================
4f439b71bSVitor Antunes
5f439b71bSVitor Antunes:Maintainer: Masatake YAMATO <yamato@redhat.com>
6f439b71bSVitor Antunes
7eb375513SMasatake YAMATO.. contents:: `Table of contents`
8eb375513SMasatake YAMATO	:depth: 3
9eb375513SMasatake YAMATO	:local:
10eb375513SMasatake YAMATO
11f439b71bSVitor Antunes----
12f439b71bSVitor Antunes
13dccba5efSHiroo HAYASHIMany changes have been introduced in Universal Ctags. Use git-log to
14f439b71bSVitor Antunesreview changes not enumerated here, especially in language parsers.
15f439b71bSVitor Antunes
1678478818SMasatake YAMATONew and extended options
17f439b71bSVitor Antunes---------------------------------------------------------------------
18f439b71bSVitor Antunes
195141fb2cSHiroo HAYASHI``--exclude-exception``, an option complementing ``--exclude``
2009be9c82SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218de6beb9SMasatake YAMATO
220ceef997SHiroo HAYASHISee :ref:`option_input_output_file` in :ref:`ctags(1) <ctags(1)>`.
238de6beb9SMasatake YAMATO
245141fb2cSHiroo HAYASHI``--maxdepth`` option
255141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26309af5d6SMasatake YAMATO
270ceef997SHiroo HAYASHISee :ref:`option_input_output_file` in :ref:`ctags(1) <ctags(1)>`.
284abc858eSHiroo HAYASHI
29ea05728cSDoug Kearns``--input-encoding=ENCODING`` and ``--output-encoding=ENCODING``
308de9bc29SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
318de9bc29SMasatake YAMATO
32ea05728cSDoug Kearns.. TODO: Review...
338de9bc29SMasatake YAMATO
34364d8088SK.TakataPeople may use their own native language in source code comments (or
35364d8088SK.Takatasometimes in identifiers) and in such cases encoding may become an issue.
36364d8088SK.TakataNowadays UTF-8 is the most widely used encoding, but some source codes
37364d8088SK.Takatastill use legacy encodings like latin1, cp932 and so on. These options
38364d8088SK.Takataare useful for such files.
398de9bc29SMasatake YAMATO
40ea05728cSDoug Kearnsctags doesn't consider the input encoding; it just reads input as a
41ea05728cSDoug Kearnssequence of bytes and uses them as is when writing tags entries.
428de9bc29SMasatake YAMATO
43ea05728cSDoug KearnsOn the other hand Vim does consider input encoding. When loading a
44ea05728cSDoug Kearnsfile, Vim converts the file contents into an internal format with one
45ea05728cSDoug Kearnsof the encodings specified in its `fileencodings` option.
468de9bc29SMasatake YAMATO
47ea05728cSDoug KearnsAs a result of this difference, Vim cannot always move the cursor to
48ea05728cSDoug Kearnsthe definition of a tag as users expect when attempting to match the
49ea05728cSDoug Kearnspatterns in a tags file.
508de9bc29SMasatake YAMATO
51ea05728cSDoug KearnsThe good news is that there is a way to notify Vim of the encoding
5200e59525SMasatake YAMATOused in a tags file with the ``TAG_FILE_ENCODING`` pseudo-tag.
538de9bc29SMasatake YAMATO
54ea05728cSDoug KearnsTwo new options have been introduced (``--input-encoding=IN`` and
55ea05728cSDoug Kearns``--output-encoding=OUT``).
568de9bc29SMasatake YAMATO
57ea05728cSDoug KearnsUsing the encoding specified with these options ctags converts input
58ea05728cSDoug Kearnsfrom ``IN`` to ``OUT``. ctags uses the converted strings when writing
59ea05728cSDoug Kearnsthe pattern parts of each tag line. As a result the tags output is
60ea05728cSDoug Kearnsencoded in ``OUT`` encoding.
61ea05728cSDoug Kearns
62ea05728cSDoug KearnsIn addition ``OUT`` is specified at the top the tags file as the
6300e59525SMasatake YAMATOvalue for the ``TAG_FILE_ENCODING`` pseudo-tag. The default value of
64ea05728cSDoug Kearns``OUT`` is UTF-8.
658de9bc29SMasatake YAMATO
668de9bc29SMasatake YAMATONOTE: Converted input is NOT passed to language parsers.
67ea05728cSDoug KearnsThe parsers still deal with input as a byte sequence.
688de9bc29SMasatake YAMATO
69ea05728cSDoug KearnsWith ``--input-encoding-<LANG>=IN``, you can specify a specific input
70ea05728cSDoug Kearnsencoding for ``LANG``. It overrides the global default value given
71ea05728cSDoug Kearnswith ``--input-encoding``.
728de9bc29SMasatake YAMATO
738de9bc29SMasatake YAMATOThe example usage can be found in *Tmain/{input,output}-encoding-option.d*.
748de9bc29SMasatake YAMATO
75ea05728cSDoug KearnsAcceptable ``IN`` and ``OUT`` values can be listed with *iconv -l* or
76ea05728cSDoug Kearns*iconv --list*. It is platform dependant.
778de9bc29SMasatake YAMATO
7871742db2SK.TakataTo enable the option, libiconv is needed on your platform.
7971742db2SK.TakataOn Windows mingw (without msys2), you must specify ``WITH_ICONV=yes``
8071742db2SK.Takatalike this::
818de9bc29SMasatake YAMATO
828de9bc29SMasatake YAMATO	C:\dev\ctags>mingw32-make -f mk_mingw.mak WITH_ICONV=yes
837b47ff23SMasatake YAMATO
849d021942SMasatake YAMATO``--list-features`` helps you to know whether your ctags executable
859d021942SMasatake YAMATOlinks to libiconv or not. You will find ``iconv`` in the output if it
869d021942SMasatake YAMATOlinks to.
879d021942SMasatake YAMATO
880ceef997SHiroo HAYASHISee also :ref:`option_output_format` in :ref:`ctags(1) <ctags(1)>`.
890ceef997SHiroo HAYASHI
90dcec1061SMasatake YAMATO``--map-<LANG>`` option
91dcec1061SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92dcec1061SMasatake YAMATO
93e77d8c43SMasatake YAMATO.. IN MAN PAGE
94e77d8c43SMasatake YAMATO
95ea05728cSDoug Kearns``--map-<LANG>`` is newly introduced to control the file name
96ea05728cSDoug Kearnsto language mappings (langmap) with finer granularity than
97ea05728cSDoug Kearns``--langmap`` allows.
98dcec1061SMasatake YAMATO
99ea05728cSDoug KearnsA langmap entry is defined as a pair; the name of the language and a
100ea05728cSDoug Kearnsfile name extension (or pattern).
101dcec1061SMasatake YAMATO
102ea05728cSDoug KearnsHere we use "spec" as a generic term representing both file name
103ea05728cSDoug Kearnsextensions and patterns.
104ea05728cSDoug Kearns
105ea05728cSDoug Kearns``--langmap`` maps specs to languages exclusively::
106dcec1061SMasatake YAMATO
10745e335abSHiroo HAYASHI  $ ctags --langdef=FOO --langmap=FOO:+.ABC \
108dcec1061SMasatake YAMATO	    --langdef=BAR --langmap=BAR:+.ABC  \
109dcec1061SMasatake YAMATO	    --list-maps | grep '\*.ABC$'
110dcec1061SMasatake YAMATO  BAR      *.ABC
111dcec1061SMasatake YAMATO
112ea05728cSDoug KearnsThough language `FOO` is added before `BAR`, only `BAR` is set as a
113ea05728cSDoug Kearnshandler for the spec `*.ABC`.
114dcec1061SMasatake YAMATO
115dccba5efSHiroo HAYASHIUniversal Ctags enables multiple parsers to be configured for a spec.
116ea05728cSDoug KearnsThe appropriate parser for a given input file can then be chosen by a
11704cce070SHiroo HAYASHIvariety of internal guessing strategies (see :ref:`Determining file language
11804cce070SHiroo HAYASHI<guessing>`).
119dcec1061SMasatake YAMATO
120ea05728cSDoug KearnsLet's see how specs can be mapped non-exclusively with
121ea05728cSDoug Kearns``--map-<LANG>``::
122dcec1061SMasatake YAMATO
12345e335abSHiroo HAYASHI    $ ctags --langdef=FOO --map-FOO=+.ABC \
124dcec1061SMasatake YAMATO	      --langdef=BAR --map-BAR=+.ABC \
125dcec1061SMasatake YAMATO	      --list-maps | grep '\*.ABC$'
126dcec1061SMasatake YAMATO    FOO      *.ABC
127dcec1061SMasatake YAMATO    BAR      *.ABC
128dcec1061SMasatake YAMATO
129ea05728cSDoug KearnsBoth `FOO` and `BAR` are registered as handlers for the spec `*.ABC`.
130ea05728cSDoug Kearns
131ea05728cSDoug Kearns``--map-<LANG>`` can also be used for removing a langmap entry.::
132dcec1061SMasatake YAMATO
13345e335abSHiroo HAYASHI    $ ctags --langdef=FOO --map-FOO=+.ABC \
134dcec1061SMasatake YAMATO	      --langdef=BAR --map-BAR=+.ABC \
135dcec1061SMasatake YAMATO	      --map-FOO=-.ABC --list-maps | grep '\*.ABC$'
136dcec1061SMasatake YAMATO    BAR      *.ABC
137dcec1061SMasatake YAMATO
13845e335abSHiroo HAYASHI    $ ctags --langdef=FOO --map-FOO=+.ABC \
139dcec1061SMasatake YAMATO	      --langdef=BAR --map-BAR=+.ABC \
140dcec1061SMasatake YAMATO	      --map-BAR=-.ABC --list-maps | grep '\*.ABC$'
141dcec1061SMasatake YAMATO    FOO      *.ABC
142dcec1061SMasatake YAMATO
14345e335abSHiroo HAYASHI    $ ctags --langdef=FOO --map-FOO=+.ABC \
144dcec1061SMasatake YAMATO	     --langdef=BAR --map-BAR=+.ABC \
145dcec1061SMasatake YAMATO	     --map-BAR=-.ABC --map-FOO=-.ABC  --list-maps | grep '\*.ABC$'
146dcec1061SMasatake YAMATO    (NOTHING)
147dcec1061SMasatake YAMATO
148ea05728cSDoug Kearns``--langmap`` provides a way to manipulate the langmap in a
149ea05728cSDoug Kearnsspec-centric manner and ``--map-<LANG>`` provides a way to manipulate
150ea05728cSDoug Kearnsthe langmap in a parser-centric manner.
151dcec1061SMasatake YAMATO
1520ceef997SHiroo HAYASHISee also :ref:`option_lang_mapping` in :ref:`ctags(1) <ctags(1)>`.
1530ceef997SHiroo HAYASHI
154fb6b7553SMasatake YAMATOGuessing parser from file contents (``-G`` option)
155fb6b7553SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156fb6b7553SMasatake YAMATO
1570ceef997SHiroo HAYASHISee :ref:`guessing` in :ref:`ctags(1) <ctags(1)>`.
158fb6b7553SMasatake YAMATO
1595141fb2cSHiroo HAYASHIIncluding line number to pattern field
1604abc858eSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161e0653dabSMasatake YAMATO
1620ceef997SHiroo HAYASHIUse ``--excmd=number``.
1630ceef997SHiroo HAYASHISee :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
164fd0718a0SMasatake YAMATO
1655141fb2cSHiroo HAYASHILong names in kinds, fields, and extra options
1665141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1675141fb2cSHiroo HAYASHI
1685141fb2cSHiroo HAYASHIA letter is used for specifying a kind, a field, or an extra entry.
1695141fb2cSHiroo HAYASHIIn Universal Ctags a name can also be used.
1705141fb2cSHiroo HAYASHI
1715141fb2cSHiroo HAYASHISurround the name with braces (`{` and `}`) in values assigned to the
1725141fb2cSHiroo HAYASHIoptions, ``--kind-<LANG>=``, ``--fields=``, or ``--extras=``.
1735141fb2cSHiroo HAYASHI
1745141fb2cSHiroo HAYASHI.. code-block:: console
1755141fb2cSHiroo HAYASHI
17645e335abSHiroo HAYASHI	$ ctags --kinds-C=+L-d ...
1775141fb2cSHiroo HAYASHI
1785141fb2cSHiroo HAYASHIThis command line uses the letters, `L` for enabling the label kind
1795141fb2cSHiroo HAYASHIand `d` for disabling the macro kind of C. The command line can be
1805141fb2cSHiroo HAYASHIrewritten with the associated names.
1815141fb2cSHiroo HAYASHI
1825141fb2cSHiroo HAYASHI.. code-block:: console
1835141fb2cSHiroo HAYASHI
18445e335abSHiroo HAYASHI	$ ctags --kinds-C='+{label}-{macro}' ...
1855141fb2cSHiroo HAYASHI
1865141fb2cSHiroo HAYASHIThe quotes are needed because braces are interpreted as meta
1875141fb2cSHiroo HAYASHIcharacters by the shell.
1885141fb2cSHiroo HAYASHI
1895141fb2cSHiroo HAYASHIThe available names can be listed with ``--list-kinds-full``,
1905141fb2cSHiroo HAYASHI``--list-fields``, or ``--list-extras``.
1915141fb2cSHiroo HAYASHI
1920ceef997SHiroo HAYASHISee also :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
1930ceef997SHiroo HAYASHI
1945141fb2cSHiroo HAYASHIWildcard in options
1955141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1965141fb2cSHiroo HAYASHI
1975141fb2cSHiroo HAYASHIFor the purpose of gathering as much as information as possible from
1985141fb2cSHiroo HAYASHIsource code the "wildcard"(``*``) option value has been introduced.
1995141fb2cSHiroo HAYASHI
2005141fb2cSHiroo HAYASHI``--extras=*``
2015141fb2cSHiroo HAYASHI	Enables all extra tags.
2025141fb2cSHiroo HAYASHI
2035141fb2cSHiroo HAYASHI``--fields=*``
2045141fb2cSHiroo HAYASHI	Enables all available fields.
2055141fb2cSHiroo HAYASHI
2065141fb2cSHiroo HAYASHI``--kinds-<LANG>=*``
2075141fb2cSHiroo HAYASHI	Enables all available kinds for ``LANG``.
2085141fb2cSHiroo HAYASHI
2095141fb2cSHiroo HAYASHI``--kinds-all=*``
2105141fb2cSHiroo HAYASHI	Enables all available kinds for all available language parsers.
2115141fb2cSHiroo HAYASHI
2120ceef997SHiroo HAYASHISee also :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
2130ceef997SHiroo HAYASHI
2145141fb2cSHiroo HAYASHIExtra tag entries (``--extras``)
2155141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2165141fb2cSHiroo HAYASHI``--extra`` option in Exuberant Ctags is renamed to ``--extras`` (plural) in
2175141fb2cSHiroo HAYASHIUniversal Ctags for making consistent with ``--kinds-<LANG>`` and ``--fields``.
2185141fb2cSHiroo HAYASHI
2195141fb2cSHiroo HAYASHIThese extra tag entries are newly introduced.
2205141fb2cSHiroo HAYASHI
2215141fb2cSHiroo HAYASHI``F``
2225141fb2cSHiroo HAYASHI	Replacement for --file-scope.
2235141fb2cSHiroo HAYASHI
2245141fb2cSHiroo HAYASHI``p``
2255141fb2cSHiroo HAYASHI	Include pseudo-tags.
2265141fb2cSHiroo HAYASHI
2275141fb2cSHiroo HAYASHI..
2285141fb2cSHiroo HAYASHI	NOT REVIEWED YET
2295141fb2cSHiroo HAYASHI
2300ceef997SHiroo HAYASHISee also :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
2310ceef997SHiroo HAYASHI
2325141fb2cSHiroo HAYASHIKinds synchronization
2335141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2345141fb2cSHiroo HAYASHISee the description about ``--kinds-<LANG>`` and ``--list-kinds-full``
2350ceef997SHiroo HAYASHIoption on :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
2365141fb2cSHiroo HAYASHI
2375141fb2cSHiroo HAYASHIEnabling/disabling pseudo-tags (``--pseudo-tags`` option)
2385141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2395141fb2cSHiroo HAYASHI
2405141fb2cSHiroo HAYASHI.. IN MAN PAGE
2415141fb2cSHiroo HAYASHI
2420ceef997SHiroo HAYASHISee :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>` and
2430ceef997SHiroo HAYASHI:ref:`ctags-client-tools(7) <ctags-client-tools(7)>` about the option.
2445141fb2cSHiroo HAYASHI
2455141fb2cSHiroo HAYASHI``--put-field-prefix`` options
2464abc858eSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
247fd0718a0SMasatake YAMATO
2480ceef997SHiroo HAYASHISee :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
249fd0718a0SMasatake YAMATO
250e67af9eaSMasatake YAMATO"always" and "never" as an argument for ``--tag-relative``
25178478818SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25278478818SMasatake YAMATO
2530ceef997SHiroo HAYASHI``--tag-relative`` option is extend.
2540ceef997SHiroo HAYASHISee :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>`.
25578478818SMasatake YAMATO
2565141fb2cSHiroo HAYASHIDefining a parser specific extra
257b24bee68SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
258b24bee68SMasatake YAMATO
2595141fb2cSHiroo HAYASHIA new ``--_extradef-<LANG>=name,description`` option allows you to
2605141fb2cSHiroo HAYASHIdefining a parser specific extra which turning on and off can be
2615141fb2cSHiroo HAYASHIreferred from a regex based parser for ``<LANG>``.
262b24bee68SMasatake YAMATO
2635141fb2cSHiroo HAYASHISee :ref:`Conditional tagging with extras <extras>` for more details.
2645141fb2cSHiroo HAYASHI
2655141fb2cSHiroo HAYASHIDefining a CPreProcessor macro from command line
2665141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2675141fb2cSHiroo HAYASHI
2685141fb2cSHiroo HAYASHINewly introduced ``-D`` option extends the function provided by
2695141fb2cSHiroo HAYASHI``-I`` option.
2705141fb2cSHiroo HAYASHI
2715141fb2cSHiroo HAYASHI``-D`` emulates the behaviour of the corresponding gcc option:
2720ceef997SHiroo HAYASHIit defines a C preprocessor macro.
2730ceef997SHiroo HAYASHI
2740ceef997SHiroo HAYASHISee :ref:`option_tags_file_contents` in :ref:`ctags(1) <ctags(1)>` and
2750ceef997SHiroo HAYASHI:ref:`cxx` for more details.
2765141fb2cSHiroo HAYASHI
2775141fb2cSHiroo HAYASHIOptions for inspecting ctags internals
2784abc858eSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279b24bee68SMasatake YAMATO
2805141fb2cSHiroo HAYASHIExuberant Ctags provides a way to inspect its internals via
2815141fb2cSHiroo HAYASHI``--list-kinds``, ``--list-languages``, and ``--list-maps``.
2824abc858eSHiroo HAYASHI
2835141fb2cSHiroo HAYASHIThis idea has been expanded in Universal Ctags with
2845141fb2cSHiroo HAYASHI``--list-kinds-full``, ``--list-map-extensions``,  ``--list-extras``,
2855141fb2cSHiroo HAYASHI``--list-features``, ``--list-fields``, ``--list-map-patterns``, and
2865141fb2cSHiroo HAYASHI``--list-pseudo-tags`` being added.
2875141fb2cSHiroo HAYASHI
2885141fb2cSHiroo HAYASHIThe original three ``--list-`` options are not changed for
2895141fb2cSHiroo HAYASHIcompatibility reasons, however, the newly introduced options are
2905141fb2cSHiroo HAYASHIrecommended for all future use.
2915141fb2cSHiroo HAYASHI
2925141fb2cSHiroo HAYASHIBy default, interactive use is assumed and ctags tries aligning the
2935141fb2cSHiroo HAYASHIlist output in columns for easier reading.
2945141fb2cSHiroo HAYASHI
2955141fb2cSHiroo HAYASHIWhen ``--machinable`` is given before a ``--list-`` option, ctags
2965141fb2cSHiroo HAYASHIoutputs the list in a format more suitable for processing by scripts.
2975141fb2cSHiroo HAYASHITab characters are used as separators between columns. The alignment
2985141fb2cSHiroo HAYASHIof columns is never considered when ``--machinable`` is given.
2995141fb2cSHiroo HAYASHI
3005141fb2cSHiroo HAYASHICurrently only ``--list-extras``, ``--list-fields`` and
3015141fb2cSHiroo HAYASHI``--list-kinds-full`` support ``--machinable`` output.
3025141fb2cSHiroo HAYASHI
3035141fb2cSHiroo HAYASHIThese new ``--list-`` options also print a column header, a line
3045141fb2cSHiroo HAYASHIrepresenting the name of each column. The header may help users and
3055141fb2cSHiroo HAYASHIscripts to understand and recognize the columns. Ignoring the column
3065141fb2cSHiroo HAYASHIheader is easy because it starts with a `#` character.
3075141fb2cSHiroo HAYASHI
3085141fb2cSHiroo HAYASHI``--with-list-header=no`` suppresses output of the column header.
3095141fb2cSHiroo HAYASHI
3100ceef997SHiroo HAYASHISee also :ref:`option_listing` in :ref:`ctags(1) <ctags(1)>`.
3110ceef997SHiroo HAYASHI
3125141fb2cSHiroo HAYASHINotice messages and ``--quiet``
3135141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3145141fb2cSHiroo HAYASHIThere were 3 classes of message in Exuberant Ctags.
3155141fb2cSHiroo HAYASHIIn addition to them Universal Ctags introduced a new class of message, *notice*.
3165141fb2cSHiroo HAYASHI
3175141fb2cSHiroo HAYASHI*fatal*
3185141fb2cSHiroo HAYASHI	A critical error has occurred and ctags aborts the execution.
3195141fb2cSHiroo HAYASHI
3205141fb2cSHiroo HAYASHI*warning*
3215141fb2cSHiroo HAYASHI	An error has occurred but ctags continues the execution.
3225141fb2cSHiroo HAYASHI
3235141fb2cSHiroo HAYASHI*notice* (new)
3245141fb2cSHiroo HAYASHI    It is less important than *warning* but more important for users than *verbose*.
3255141fb2cSHiroo HAYASHI
3265141fb2cSHiroo HAYASHI*verbose*
3275141fb2cSHiroo HAYASHI	Mainly used for debugging purposes.
3285141fb2cSHiroo HAYASHI
3295141fb2cSHiroo HAYASHIGenerally the user can ignore *notice* class messages and ``--quiet``
3305141fb2cSHiroo HAYASHIcan be used to disable them.
3315141fb2cSHiroo HAYASHI
3325141fb2cSHiroo HAYASHI*verbose* class messages are disabled by default, and ``--verbose`` or ``-V``
3335141fb2cSHiroo HAYASHIcan be used to enable them.
3345141fb2cSHiroo HAYASHI
3350ceef997SHiroo HAYASHISee also :ref:`option_misc` in :ref:`ctags(1) <ctags(1)>`.
3360ceef997SHiroo HAYASHI
3375141fb2cSHiroo HAYASHISkipping utf-8 BOM
33806491a9dSSzymon Tomasz Stefanek~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33906491a9dSSzymon Tomasz Stefanek
3405141fb2cSHiroo HAYASHIThe three bytes sequence(``\xEF\xBB\xBF``) at the head of an input
3415141fb2cSHiroo HAYASHIfile is skipped when parsing.
34206491a9dSSzymon Tomasz Stefanek
3435141fb2cSHiroo HAYASHITODO:
3445141fb2cSHiroo HAYASHI
3455141fb2cSHiroo HAYASHI* Do the same in guessing and selecting parser stage.
3465141fb2cSHiroo HAYASHI* Refect the BOM detection to encoding option
3475141fb2cSHiroo HAYASHI
3485141fb2cSHiroo HAYASHIInteractive mode
3495141fb2cSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3505141fb2cSHiroo HAYASHI
3515141fb2cSHiroo HAYASHIA new ``--_interactive`` option launches a JSON based command REPL which
3525141fb2cSHiroo HAYASHIcan be used to control ctags generation programmatically.
3535141fb2cSHiroo HAYASHI
3545141fb2cSHiroo HAYASHISee :ref:`interactive-mode` for more details.
35506491a9dSSzymon Tomasz Stefanek
356ea999d80SMasatake YAMATOPCRE2 regular expression
357ea999d80SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358ea999d80SMasatake YAMATO
359ea999d80SMasatake YAMATOWith ``{pcre2}`` (or ``p``) flag, PCRE2 expressions can be used in
360ea999d80SMasatake YAMATO``--regex-<LANG>=``, ``--mline-regex-<LANG>=``, and
361ea999d80SMasatake YAMATO``--_mtable-regex-<LANG>=`` if the ctags is built with ``pcre2`` library.
362ea999d80SMasatake YAMATO
363ea999d80SMasatake YAMATO
3644abc858eSHiroo HAYASHIIncompatible changes in command line
3654abc858eSHiroo HAYASHI---------------------------------------------------------------------
36606491a9dSSzymon Tomasz Stefanek
3674abc858eSHiroo HAYASHI.. NOT REVIEWED YET
368124dad23SMasatake YAMATO
3694abc858eSHiroo HAYASHI``-D`` option
3704abc858eSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371124dad23SMasatake YAMATO
3724abc858eSHiroo HAYASHIFor a ctags binary that had debugging output enabled in the build config
3734abc858eSHiroo HAYASHIstage, ``-D`` was used for specifying the level of debugging
3744abc858eSHiroo HAYASHIoutput. It is changed to ``-d``. This change is not critical because
3754abc858eSHiroo HAYASHI``-D`` option was not described in ctags.1 man page.
3764abc858eSHiroo HAYASHI
3774abc858eSHiroo HAYASHIInstead ``-D`` is used for defining a macro in CPreProcessor parser.
3784abc858eSHiroo HAYASHI
379bb84f88aSHiroo HAYASHIChanges imported from Exuberant Ctags
380a358a115SMasatake YAMATO---------------------------------------------------------------------
381bb84f88aSHiroo HAYASHISee "Exuberant Ctags" in "Tracking other projects" for detailed
3824abc858eSHiroo HAYASHIinformation regarding imported changes.
383a358a115SMasatake YAMATO
3844abc858eSHiroo HAYASHISome changes have also been imported from Fedora and Debian.
3857d6be565SMasatake YAMATO
3869bb314e1SHiroo HAYASHIParser related changes
3879bb314e1SHiroo HAYASHI---------------------------------------------------------------------
3889bb314e1SHiroo HAYASHI
3899bb314e1SHiroo HAYASHINew parsers
3909bb314e1SHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3919bb314e1SHiroo HAYASHIThe following parsers have been added:
3929bb314e1SHiroo HAYASHI
3939bb314e1SHiroo HAYASHI* Abaqus
3949bb314e1SHiroo HAYASHI* Abc
3959bb314e1SHiroo HAYASHI* Ada
3969bb314e1SHiroo HAYASHI* AnsiblePlaybook *libyaml*
3979bb314e1SHiroo HAYASHI* Asciidoc
3989bb314e1SHiroo HAYASHI* Autoconf
3999bb314e1SHiroo HAYASHI* Automake
4009bb314e1SHiroo HAYASHI* AutoIt
4019bb314e1SHiroo HAYASHI* BibTeX
4029bb314e1SHiroo HAYASHI* Clojure
4039bb314e1SHiroo HAYASHI* CMake *optlib*
4049bb314e1SHiroo HAYASHI* CSS
4059bb314e1SHiroo HAYASHI* Ctags option library *optlib*
4069bb314e1SHiroo HAYASHI* CUDA
4079bb314e1SHiroo HAYASHI* D
4089bb314e1SHiroo HAYASHI* DBusIntrospect *libxml*
4099bb314e1SHiroo HAYASHI* Diff
4109bb314e1SHiroo HAYASHI* DTD
4119bb314e1SHiroo HAYASHI* DTS
4129bb314e1SHiroo HAYASHI* Elixir *optlib*
413*94e964efSNik Silver* Elm *peg/packcc*
4149bb314e1SHiroo HAYASHI* Falcon
41553286604SMasatake YAMATO* FrontMatter *only YAML syntax, running as a guest  on R?Markdown*
41600f9a206SMasatake YAMATO* FunctionParameters *perl based subparser*
4179bb314e1SHiroo HAYASHI* Gdbinit script *optlib*
418197e8d50SMasatake YAMATO* GemSpec *Ruby based subparser*
419ebbfee1eSDavid Yu Yang* GDScript
4209bb314e1SHiroo HAYASHI* Glade *libxml*
4219bb314e1SHiroo HAYASHI* Go
4229bb314e1SHiroo HAYASHI* Haskell
4239bb314e1SHiroo HAYASHI* Haxe
4242d0d9377SMasatake YAMATO* iPythonCell *optlib*, *pthon based subparser*
4259bb314e1SHiroo HAYASHI* Inko *optlib*
4269bb314e1SHiroo HAYASHI* JavaProperties
4279bb314e1SHiroo HAYASHI* JSON
4289bb314e1SHiroo HAYASHI* Julia
4299bb314e1SHiroo HAYASHI* Kconfig *optlib*
430d532b5c4SJan Dolinár* Kotlin *peg/packcc*
4319bb314e1SHiroo HAYASHI* GNU linker script(LdScript)
432f5bca49fSMasatake YAMATO* LEX *optlib*
4339bb314e1SHiroo HAYASHI* Man page *optlib*
43449ad552dSJiří Techet* Markdown
4359bb314e1SHiroo HAYASHI* Maven2 *libxml*
4369bb314e1SHiroo HAYASHI* MesonBuild (Meson) *optlib*
43794868d14SMasatake YAMATO* MesonOptions *optlib+script*
43804cce070SHiroo HAYASHI* Moose *perl based subparser*
4399bb314e1SHiroo HAYASHI* Myrddin
4409bb314e1SHiroo HAYASHI* M4
4419bb314e1SHiroo HAYASHI* NSIS
4429bb314e1SHiroo HAYASHI* ObjectiveC
44385c6b72eSPierre-Andre* Org *optlib*
444872c6acfSVasily Kulikov* OpenAPI (3.x.x / Swagger 2.0) *Yaml based subparser*
4459bb314e1SHiroo HAYASHI* Passwd *optlib*
4469bb314e1SHiroo HAYASHI* PuppetManifest *optlib*
4479bb314e1SHiroo HAYASHI* Perl6
4489bb314e1SHiroo HAYASHI* Pod *optlib*
4499bb314e1SHiroo HAYASHI* PowerShell
4509bb314e1SHiroo HAYASHI* PropertyList(plist) *libxml*
4519bb314e1SHiroo HAYASHI* Protobuf
4529bb314e1SHiroo HAYASHI* PythonLoggingConfig
4539bb314e1SHiroo HAYASHI* QemuHX *optlib*
4549bb314e1SHiroo HAYASHI* QtMoc
4559bb314e1SHiroo HAYASHI* R
45604cce070SHiroo HAYASHI* R6Class *R based subparser*
4574088430eSMasatake YAMATO* Rake *Ruby based subparser*
458d876d176SMasatake YAMATO* RDoc *optlib pcre2*
4599bb314e1SHiroo HAYASHI* RelaxNG *libxml*
4609bb314e1SHiroo HAYASHI* ReStructuredText
4613bbeaff4SMasatake YAMATO* RMarkdown *Markdown based subparser*
4629bb314e1SHiroo HAYASHI* Robot
4638d3a6bc8SMasatake YAMATO* RpmMacros *optlib*
4649bb314e1SHiroo HAYASHI* RpmSpec
465eff0ecc1SMasatake YAMATO* RSpec *Ruby based subparser*
4669bb314e1SHiroo HAYASHI* Rust
46704cce070SHiroo HAYASHI* S4Class *R based subparser*
4689bb314e1SHiroo HAYASHI* SCSS *optlib*
4699bb314e1SHiroo HAYASHI* SystemdUnit
4709bb314e1SHiroo HAYASHI* SystemTap *optlib*
4719bb314e1SHiroo HAYASHI* SystemVerilog
4729bb314e1SHiroo HAYASHI* SVG *libxml*
4739bb314e1SHiroo HAYASHI* TclOO (see :ref:`The new Tcl parser <tcl>`)
4743532d591SMasatake YAMATO* Thrift *peg/packcc*
4759bb314e1SHiroo HAYASHI* TTCN
4769bb314e1SHiroo HAYASHI* Txt2tags
4779bb314e1SHiroo HAYASHI* TypeScript
4789bb314e1SHiroo HAYASHI* Varlink *peg/packcc*
4799bb314e1SHiroo HAYASHI* WindRes
4809bb314e1SHiroo HAYASHI* XSLT v1.0 *libxml*
4819bb314e1SHiroo HAYASHI* Yacc
4829bb314e1SHiroo HAYASHI* Yaml *libyaml*
4839bb314e1SHiroo HAYASHI* YumRepo
4849bb314e1SHiroo HAYASHI* Zephir
4859bb314e1SHiroo HAYASHI
48604cce070SHiroo HAYASHISee :ref:`optlib` for details on *optlib*.
4879bb314e1SHiroo HAYASHILibxml2 is required to use the parser(s) marked with *libxml*.
4889bb314e1SHiroo HAYASHILibyaml is required to use the parser(s) marked with *libyaml*.
489d876d176SMasatake YAMATOpcre2 is required to use the parser(s) marked with *pcre2*.
4909bb314e1SHiroo HAYASHI
4919bb314e1SHiroo HAYASHITIPS: you can list newly introduced parsers if you also have
492bb84f88aSHiroo HAYASHIExuberant Ctags installed with following command line:
4939bb314e1SHiroo HAYASHI
4949bb314e1SHiroo HAYASHI.. code-block:: console
4959bb314e1SHiroo HAYASHI
4969bb314e1SHiroo HAYASHI		$ diff -ruN <(universal-ctags --list-languages) <(exuberant-ctags --list-languages)  | grep '^[-+]'
4979bb314e1SHiroo HAYASHI
4989bb314e1SHiroo HAYASHIFully improved parsers
4999bb314e1SHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5009bb314e1SHiroo HAYASHI* C (see :ref:`The new C/C++ parser <cxx>`)
5019bb314e1SHiroo HAYASHI* C++ (see :ref:`The new C/C++ parser <cxx>`)
5029bb314e1SHiroo HAYASHI* Python (see :ref:`The new Python parser <python>`)
5039bb314e1SHiroo HAYASHI* HTML (see :ref:`The new HTML parser <html>`)
5049bb314e1SHiroo HAYASHI* Tcl (see :ref:`The new Tcl parser <tcl>`)
5059bb314e1SHiroo HAYASHI* ITcl (see :ref:`The new Tcl parser <tcl>`)
5069bb314e1SHiroo HAYASHI* Ant (rewritten with *libxml*)
5079bb314e1SHiroo HAYASHI* PHP
5089bb314e1SHiroo HAYASHI* Verilog/SystemVerilog
5097d6be565SMasatake YAMATO
5104abc858eSHiroo HAYASHIAutomatically expanding CPreProcessor macros defined in the same input file (HIGHLY EXPERIMENTAL)
5114abc858eSHiroo HAYASHI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5124abc858eSHiroo HAYASHI
51304cce070SHiroo HAYASHISee :ref:`The new C/C++ parser <cxx>` for more details.
5144abc858eSHiroo HAYASHI
5151e450c36SMasatake YAMATOReadtags
5161e450c36SMasatake YAMATO---------------------------------------------------------------------
5171e450c36SMasatake YAMATO
518ea05728cSDoug KearnsPrinting line numbers with ``-n``
5191e450c36SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5208e20c4deSMasatake YAMATOSee :ref:`readtags(1) <readtags(1)>`.
5211e450c36SMasatake YAMATO
5221e450c36SMasatake YAMATOFiltering in readtags command
5231e450c36SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5248e20c4deSMasatake YAMATOSee :ref:`readtags(1) <readtags(1)>`.
5258e20c4deSMasatake YAMATO
5261e450c36SMasatake YAMATOreadtags has ability to find tag entries by name.
5271e450c36SMasatake YAMATO
528ea05728cSDoug KearnsThe concept of filtering is inspired by the display filter of
529ea05728cSDoug KearnsWireshark. You can specify more complex conditions for searching.
5301e450c36SMasatake YAMATO
531ea05728cSDoug KearnsAll symbols starting with `$` represent a field of a tag entry which
532ea05728cSDoug Kearnsis being tested against the S expression. Most will evaluate as a
533ea05728cSDoug Kearnsstring or `#f`. It evaluates to `#f` when the field doesn't exist.
534cb4b3ce9SMasatake YAMATO
535cb4b3ce9SMasatake YAMATOThe `scope` field holds structured data: the kind and name of the
536cb4b3ce9SMasatake YAMATOupper scope combined with `:`. The hold the value is stored to
537cb4b3ce9SMasatake YAMATO`$scope`. The kind part is mapped to `$scope-kind`, and the name part
538cb4b3ce9SMasatake YAMATOto `$scope-name`.
5391e450c36SMasatake YAMATO
540ea05728cSDoug Kearns`$scope-kind` and `$scope-name` can only be used if the input tags
541ea05728cSDoug Kearnsfile is generated by ctags with ``--fields=+Z``.
5421e450c36SMasatake YAMATO
543ea05728cSDoug Kearns`$` is a generic accessor for accessing extension fields.
5444f9716b3SMasatake YAMATO`$` takes one argument: the name of an extension field.
545ea05728cSDoug KearnsIt returns the value of the field as a string if a value
5464f9716b3SMasatake YAMATOis given, or `#f`.
5474f9716b3SMasatake YAMATO
548cb4b3ce9SMasatake YAMATOFollowing examples shows how `prefix?`, `suffix?`, and
549cb4b3ce9SMasatake YAMATO`substr?` work.
5501e450c36SMasatake YAMATO::
5511e450c36SMasatake YAMATO
5521e450c36SMasatake YAMATO	(prefix? "TARGET" "TA")
5531e450c36SMasatake YAMATO	=> #t
5541e450c36SMasatake YAMATO
5551e450c36SMasatake YAMATO	(prefix? "TARGET" "RGET")
5561e450c36SMasatake YAMATO	=> #f
5571e450c36SMasatake YAMATO
5581e450c36SMasatake YAMATO	(prefix? "TARGET" "RGE")
5591e450c36SMasatake YAMATO	=> #f
5601e450c36SMasatake YAMATO
5611e450c36SMasatake YAMATO	(suffix? "TARGET" "TA")
5621e450c36SMasatake YAMATO	=> #f
5631e450c36SMasatake YAMATO
5641e450c36SMasatake YAMATO	(suffix? "TARGET" "RGET")
5651e450c36SMasatake YAMATO	=> #t
5661e450c36SMasatake YAMATO
5671e450c36SMasatake YAMATO	(suffix? "TARGET" "RGE")
5681e450c36SMasatake YAMATO	=> #f
5691e450c36SMasatake YAMATO
5701e450c36SMasatake YAMATO	(substr? "TARGET" "TA")
5711e450c36SMasatake YAMATO	=> #t
5721e450c36SMasatake YAMATO
5731e450c36SMasatake YAMATO	(suffix? "TARGET" "RGET")
5741e450c36SMasatake YAMATO	=> #t
5751e450c36SMasatake YAMATO
5761e450c36SMasatake YAMATO	(suffix? "TARGET" "RGE")
5771e450c36SMasatake YAMATO	=> #t
5781e450c36SMasatake YAMATO
5791e450c36SMasatake YAMATO	(and (suffix? "TARGET" "TARGET")
5801e450c36SMasatake YAMATO	     (prefix? "TARGET" "TARGET")
5811e450c36SMasatake YAMATO	     (substr? "TARGET" "TARGET")
5821e450c36SMasatake YAMATO	=> #t
5831e450c36SMasatake YAMATO
5841e450c36SMasatake YAMATO
5850c649e95SMasatake YAMATOSorting in readtags command
5860c649e95SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5870c649e95SMasatake YAMATOreadtags can sort the tag entries before printing.
5880c649e95SMasatake YAMATOYou can specify the way to sort with -S option. Like ``-Q`` option, ``-S``
5890c649e95SMasatake YAMATOalso takes an S expression.
5900c649e95SMasatake YAMATO
591cb4b3ce9SMasatake YAMATOSee :ref:`readtags(1) <readtags(1)>`.
5920c649e95SMasatake YAMATO
5930c649e95SMasatake YAMATO
594ac9d0c49SMasatake YAMATOListing pseudo tags with ``-D``
595ac9d0c49SMasatake YAMATO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5968e20c4deSMasatake YAMATOSee :ref:`readtags(1) <readtags(1)>`.
597