-
Couldn't load subscription status.
- Fork 641
[RFC] readtags: supports multiple tag files #4068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4068 +/- ##
==========================================
+ Coverage 85.51% 85.53% +0.02%
==========================================
Files 237 237
Lines 57030 57030
==========================================
+ Hits 48769 48782 +13
+ Misses 8261 8248 -13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Masatake YAMATO <[email protected]>
The original code called findTag or listTags directly in the process of command line parsing. This change introduces new data structure named actionSpec. During parsing command line, readtags builds an actionSpec. After parsing readtags takes an action based on the actionSpec. Signed-off-by: Masatake YAMATO <[email protected]>
…putSpec Signed-off-by: Masatake YAMATO <[email protected]>
… the canonWorkArea Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: Masatake YAMATO <[email protected]>
$ ~/bin/ctags -o podman.tags -R ~/var/podman $ ~/bin/ctags -o glibc.tags -R ~/var/glibc $ ~/bin/ctags -o coreutils832.tags -R /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32 $ ./readtags -A -Q '(and (eq? $name "main") (#/.*user.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags -l main /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/gnulib-tests/test-userspec.c /^main (void)$/ main /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/lib/getusershell.c /^main (void)$/ main /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/lib/userspec.c /^main (int argc, char **argv)$/ main /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/src/users.c /^main (int argc, char **argv)$/ $ ./readtags -A -Q '(and (eq? $name "main") (#/.*container.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags -l main /home/yamato/var/glibc/support/echo-container.c /^main (int argc, const char **argv)$/ main /home/yamato/var/glibc/support/shell-container.c /^main (int argc, const char **argv)$/ main /home/yamato/var/glibc/support/test-container.c /^main (int argc, char **argv)$/ main /home/yamato/var/glibc/support/true-container.c /^main (void)$/ $ ./readtags -A -Q '(not (#/.*_test.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags rootless rootless /home/yamato/var/podman/pkg/rootless/rootless.go /^package rootless$/ rootless /home/yamato/var/podman/pkg/rootless/rootless_freebsd.go /^package rootless$/ rootless /home/yamato/var/podman/pkg/rootless/rootless_linux.go /^package rootless$/ rootless /home/yamato/var/podman/pkg/rootless/rootless_unsupported.go /^package rootless$/ rootless /home/yamato/var/podman/vendor/github.com/containers/image/v5/internal/rootless/rootless.go /^package rootless$/ Signed-off-by: Masatake YAMATO <[email protected]>
3e67a0f to
953f035
Compare
This pull request implements the ideas I wrote in universal-ctags/citre#178.
Example sessions:
With this pull request, readtags can take multiple -t option. So you can find a tag in multiple files at once. Using multiple threads is future work.
This pull request adds
!_READTAGS_INCLUDEdirective. If a tag file is specified with the pseudo tag, readtags reads the tas file, too, as if the tag file is specified with -t on the command line.This pull request adds -X/--generate-aggregate-tag-file option to readtags. With the option, readtags generate an aggregate tag file enumerating all tag files specified with -t on the command line.