summaryrefslogtreecommitdiffstats
path: root/lualib/rspamadm/grep.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-29 15:24:26 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-29 15:24:26 +0100
commit099cb8fb099054d2711c61ebfac1be05f9519748 (patch)
treedd209a26f73da064c430e99b8c8a7555a54e15c3 /lualib/rspamadm/grep.lua
parentb72a6879c8dea90986387d58e7decb19e03ab17f (diff)
downloadrspamd-099cb8fb099054d2711c61ebfac1be05f9519748.tar.gz
rspamd-099cb8fb099054d2711c61ebfac1be05f9519748.zip
[Project] Convert corpus_test to new format, document all options
Diffstat (limited to 'lualib/rspamadm/grep.lua')
-rw-r--r--lualib/rspamadm/grep.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/lualib/rspamadm/grep.lua b/lualib/rspamadm/grep.lua
index f20ac76e5..0af83c1cf 100644
--- a/lualib/rspamadm/grep.lua
+++ b/lualib/rspamadm/grep.lua
@@ -22,15 +22,17 @@ local parser = argparse()
:name "rspamadm grep"
:description "Search for patterns in rspamd logs"
:help_description_margin(30)
-parser:option "-s --string"
- :description('Plain string to search (case-insensitive)')
- :argname "<str>"
+parser:mutex(
+ parser:option "-s --string"
+ :description('Plain string to search (case-insensitive)')
+ :argname "<str>",
+ parser:option "-p --pattern"
+ :description('Pattern to search for (regex)')
+ :argname "<re>"
+)
parser:flag "-l --lua"
:description('Use Lua patterns in string search')
-parser:option "-p --pattern"
- :description('Pattern to search for (regex)')
- :args(1)
- :argname "<re>"
+
parser:argument "input":args "*"
:description('Process specified inputs')
:default("stdin")