resource options should support multi specification with better semantics
- Dominant language
- Python
- Stars
- 16
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The resource options https://github.com/box/wavectl/blob/master/doc/CommandReference.md#resource-options should have better semantics if they are specified multiple times.
Right now, the later specified one overwrites an earlier specified one.
I think append action [here](https://docs.python.org/2/library/argparse.html#action) is more suitable for them.
Whatever is specified mutiple times, the implementation should AND the speficied options.
For example if the user has specified
`wavectl show alert --name "Kubernetes" --name "Node[0-9]+1"`
the command should only return alerts whose name match both "Kubernetes" **AND** "Node[0-9]+1" regular expressions
Contributor guide
Research direction
Read the resource options section in doc/CommandReference.md and the argparse documentation linked in the issue, then trace how repeated options are parsed and applied by wavectl. Done means repeated specifications are combined with AND semantics, as in the provided alert-name example, rather than later values overwriting earlier ones.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100