-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: allow to use {...} notation when enabling/disabling a pseudo tag
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
5 changed files
with
144 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* EMPTY */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright: 2020 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
CTAGS=$1 | ||
O="--quiet --options=NONE " | ||
|
||
echo '# single with no curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags=TAG_PROGRAM_URL \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# single with curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags='{TAG_PROGRAM_URL}' \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# single with + no curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags=+TAG_PROGRAM_URL \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# single with + curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags=+'{TAG_PROGRAM_URL}' \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# single with +- no curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags=+TAG_PROGRAM_VERSION \ | ||
--pseudo-tags=+TAG_PROGRAM_URL \ | ||
--pseudo-tags=-TAG_PROGRAM_VERSION \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# single with +- curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags=+'{TAG_PROGRAM_VERSION}' \ | ||
--pseudo-tags=+'{TAG_PROGRAM_URL}' \ | ||
--pseudo-tags=-'{TAG_PROGRAM_VERSION}' \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# multiple specifications with +- curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags='+{TAG_PROGRAM_VERSION}{TAG_FILE_SORTED}{TAG_PROGRAM_URL}-{TAG_PROGRAM_VERSION}' \ | ||
-o - \ | ||
input.c | ||
|
||
echo '# multiple specifications with -+- curly bracket' | ||
${CTAGS} $O \ | ||
--extras=+p --pseudo-tags= \ | ||
--pseudo-tags='-{TAG_PROGRAM_VERSION}+{TAG_PROGRAM_VERSION}{TAG_FILE_FORMAT}{TAG_PROGRAM_URL}-{TAG_PROGRAM_VERSION}' \ | ||
-o - \ | ||
input.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# single with no curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# single with curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# single with + no curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# single with + curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# single with +- no curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# single with +- curly bracket | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# multiple specifications with +- curly bracket | ||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
# multiple specifications with -+- curly bracket | ||
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters