-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add --include and --exclude and override defaults based on output mode #77
Conversation
034d8ec
to
642820b
Compare
642820b
to
20e599d
Compare
I think I'm doing it wrong, but I'm not sure what I'm doing wrong:
|
I could use a fully worked-out example of |
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.
I could use a fully worked-out example of --include and --exclude; I wasn't able to figure out how to use it from these docs.
Great point, @vielmetti! The https://www.packet.com/developers/api/common-parameters/ describes how includes and excludes are used in the API. Effectively, this expands or collapses I'll include a section in the README.md about how to use this in practice. The reason that By changing the default include/exclude behavior for commands, and allowing these to be overridden ( To maintain backward compatibility for long output formats (yaml, json) the default embedding options are retained in those modes.
|
Makes sense - anything to speed up the common case! |
Signed-off-by: Marques Johansson <[email protected]>
Adds `--include` and `--exclude` which can accept comma-separated values or can be given multiple times to specify more includes/excludes. Naturally, dotted syntax (as supported by the API) can be used to include/exclude deep values. Default includes will not be used when their results are not rendered. Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
20e599d
to
30cb5a0
Compare
@vielmetti Updated in the latest push with some README.md content about |
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.
Looks good to me - I'll have to test with one of my jumbo organization that has dozens of projects.
--json
and--yaml
arguments as a simplification.--include
and--exclude
which can accept comma-separated values or can be given multiple times to specify more includes/excludes. Naturally, dotted syntax (as supported by the API) can be used to include/exclude deep values.--include=""
can be used.Fixes #51:
packet projects get
no longer includesmembers
as an include, unless--json
/--yaml
is provided