-
Notifications
You must be signed in to change notification settings - Fork 460
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
The --filter flag improvments #1361
The --filter flag improvments #1361
Conversation
cmd/crictl/image.go
Outdated
@@ -147,7 +147,7 @@ var listImageCommand = &cli.Command{ | |||
&cli.StringSliceFlag{ | |||
Name: "filter", | |||
Aliases: []string{"f"}, | |||
Usage: "The filtering flag format is of 'dangling=(true/false)', 'reference=regex', '(before|since)=<image-name>[:<tag>]|<image id>|<image@digest>'", | |||
Usage: "Filter output based on provided conditions.\nEach filter has an AND style relationship with the other others.\nAvailable filters: \n* dangling=BOOL\n* reference=/Regular Expression/\n* before=<image-name>[:<tag>]|<image id>|<image@digest>\n* since=<image-name>[:<tag>]|<image id>|<image@digest>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps?
Usage: "Filter output based on provided conditions.\nEach filter has an AND style relationship with the other others.\nAvailable filters: \n* dangling=BOOL\n* reference=/Regular Expression/\n* before=<image-name>[:<tag>]|<image id>|<image@digest>\n* since=<image-name>[:<tag>]|<image id>|<image@digest>", | |
Usage: "Filter output based on provided conditions.\nAvailable filters: \n* dangling=(boolean - true or false)\n* reference=/regular expression/\n* before=<image-name>[:<tag>]|<image id>|<image@digest>\n* since=<image-name>[:<tag>]|<image id>|<image@digest>\nMultiple filters can be combined together.", |
Produces:
--filter value, -f value [ --filter value, -f value ] Filter output based on provided conditions.
Available filters:
* dangling=(boolean - true or false)
* reference=/regular expression/
* before=<image-name>[:<tag>]|<image id>|<image@digest>
* since=<image-name>[:<tag>]|<image id>|<image@digest>
Multiple filters can be combined together.
I wish the CLI package aligned usage to the right nicely.
docs/crictl.1
Outdated
@@ -461,7 +461,7 @@ k8s.gcr.io/pause 3.1 da86e6ba6ca19 742kB | |||
|
|||
.SS Filter images | |||
.PP | |||
The following filters are available \fB\fC\-\-filter\fR, \fB\fC\-f\fR, filters are chainable and processed in the declared order: | |||
The following filters are available \fB\fC\-\-filter\fR, \fB\fC\-f\fR\&. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file might need to get regenerated.
* handle regexp error * better usage info * better documentation Signed-off-by: roman-kiselenko <roman.kiselenko.dev@gmail.com>
/approve |
@kwilczynski: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@roman-kiselenko, thank you! Looks good! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kwilczynski, roman-kiselenko, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
A bunch of changes from PR #1359
Follows @kwilczynski comments.
Better usage:
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
A bunch of changes from previous PR review.
None
Does this PR introduce a user-facing change?
None