Skip to content

Commit 2b74d4b

Browse files
committed
Tmain: list common extras when NONE is passed to --list-extras
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent dd98353 commit 2b74d4b

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

Tmain/list-extras.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ CTAGS=$1
55

66
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --list-extras
77
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --machinable --list-extras
8+
${CTAGS} --quiet --options=NONE --extras= --with-list-header --list-extras=NONE

Tmain/list-extras.d/stdout-expected.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ s subparser yes NONE no Include tags generated by subparsers
2626
- configPrefixed yes Kconfig no prepend CONFIG_ to config names
2727
- funcmap yes QemuHX no Include mapping SQMP to C function name
2828
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
29+
#LETTER NAME ENABLED LANGUAGE FIXED DESCRIPTION
30+
- anonymous no NONE no Include tags for non-named objects like lambda
31+
F fileScope no NONE no Include tags of file scope
32+
f inputFile no NONE no Include an entry for the base file name of every input file
33+
g guest no NONE no Include tags generated by guest parsers
34+
p pseudo no NONE no Include pseudo tags
35+
q qualified no NONE no Include an extra class-qualified tag entry for each tag
36+
r reference no NONE no Include reference tags
37+
s subparser no NONE no Include tags generated by subparsers

docs/man/ctags.1.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,9 +1016,11 @@ Listing Options
10161016
``--list-excludes``
10171017
Lists the current exclusion patterns used to exclude files.
10181018

1019-
``--list-extras[=(<language>|all)]``
1019+
``--list-extras[=(<language>|NONE|all)]``
10201020
Lists the extras recognized for either the specified *<language>* or
1021-
``all`` languages. See "`Extras`_" subsection to know what are extras.
1021+
``all`` languages. If ``NONE`` is specified, it lists only extras
1022+
common in all languages.
1023+
See "`Extras`_" subsection to know what are extras.
10221024
``all`` is used as default value if the option argument is omitted.
10231025

10241026
An extra can be enabled or disabled with ``--extras=`` for common

main/options.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,6 +2085,8 @@ static void processListExtrasOption (
20852085
xtagColprintAddLanguageLines (table, i);
20862086
}
20872087
}
2088+
else if (strcasecmp (parameter, RSV_NONE) == 0)
2089+
xtagColprintAddCommonLines (table);
20882090
else
20892091
{
20902092
langType language = getNamedLanguage (parameter, 0);

man/ctags.1.rst.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,9 +1016,11 @@ Listing Options
10161016
``--list-excludes``
10171017
Lists the current exclusion patterns used to exclude files.
10181018

1019-
``--list-extras[=(<language>|all)]``
1019+
``--list-extras[=(<language>|NONE|all)]``
10201020
Lists the extras recognized for either the specified *<language>* or
1021-
``all`` languages. See "`Extras`_" subsection to know what are extras.
1021+
``all`` languages. If ``NONE`` is specified, it lists only extras
1022+
common in all languages.
1023+
See "`Extras`_" subsection to know what are extras.
10221024
``all`` is used as default value if the option argument is omitted.
10231025

10241026
An extra can be enabled or disabled with ``--extras=`` for common

0 commit comments

Comments
 (0)