Skip to content
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

Variable for all remaining args in rule #107

Closed
johnrengelman opened this issue Sep 2, 2019 · 1 comment · Fixed by #116
Closed

Variable for all remaining args in rule #107

johnrengelman opened this issue Sep 2, 2019 · 1 comment · Fixed by #116
Labels
enhancement New feature or request

Comments

@johnrengelman
Copy link

The arg matching for a rule only allows for extracting an explicit list of values.
However, some rules might have variable argument lists. For example, command <command name> <args>.
It would be helpful, if I could specify a matcher to the remaining arg values:

args:
  - cmd
  - cmdArgs+

with cmdArgs being set to the remaining line after the matches are extracted.
For example, command nc google.com 443, would resolve to:
cmd=nc and cmdArgs="google.com 443"

@JordanSussman
Copy link
Collaborator

JordanSussman commented Sep 2, 2019

I agree that this type of functionality would be useful. Until someone has the opportunity to implement this, you could potentially use optional arguments that is documented here until this type of functionality is added. The aforementioned recommendation wouldn't solve all scenarios but could solve common options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants