summaryrefslogtreecommitdiff
path: root/src/rost.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rost.c')
-rw-r--r--src/rost.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rost.c b/src/rost.c
index 8a7e806..1d4929f 100644
--- a/src/rost.c
+++ b/src/rost.c
@@ -96,7 +96,8 @@ static void show_rost_help(const char *name)
printf("\t-j --print-json\t\tPrint matching strings in JSON format instead of simple text.\n");
printf("\t-s --print-strings\tPrint matching strings (default text format only).\n");
printf("\t-S --print-stats\tPrint rules' statistics.\n");
- printf("\t-t --tag=TAG\t\tprint only matching rules tagged as TAG (default text format only).\n");
+ printf("\t-g --print-tags\t\tPrint tags linked to rules on match (default text format only).\n");
+ printf("\t-t --tag=TAG\t\tPrint only matching rules tagged as TAG (default text format only).\n");
printf("\t-V --verbosity=level\tSet the log level (0 for all messages, %u for none).\n", LMT_COUNT);
printf("\n");
@@ -241,6 +242,7 @@ int main(int argc, char **argv)
{ "print-json", no_argument, NULL, 'j' },
{ "print-strings", no_argument, NULL, 's' },
{ "print-stats", no_argument, NULL, 'S' },
+ { "print-tags", no_argument, NULL, 'g' },
{ "tag", required_argument, NULL, 't' },
{ "verbosity", required_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
@@ -262,7 +264,7 @@ int main(int argc, char **argv)
while (true)
{
- ret = getopt_long(argc, argv, "hvA:CjsSt:V:", long_options, &index);
+ ret = getopt_long(argc, argv, "hvA:CjsSgt:V:", long_options, &index);
if (ret == -1) break;
switch (ret)
@@ -301,6 +303,10 @@ int main(int argc, char **argv)
g_scan_options_set_print_stats(options, true);
break;
+ case 'g':
+ g_scan_options_set_print_tags(options, true);
+ break;
+
case 't':
g_scan_options_select_tag(options, optarg);
break;