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

Need shorthand flags for follow and container in app logs #15398

Closed
ashupednekar opened this issue Sep 7, 2023 · 0 comments
Closed

Need shorthand flags for follow and container in app logs #15398

ashupednekar opened this issue Sep 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ashupednekar
Copy link
Contributor

ashupednekar commented Sep 7, 2023

Summary

What change you think needs making.

Changed the follow and container flags to BoolVarP and StringVarP respectively in order to support -f and -c shorthands in the command

Motivation

Please give examples of your use case, e.g. when would you use this.

When checking logs of a container... right now we have to write out the whole flag name..

i.e.
argocd app logs my-app --container my-container --follow --tail 100

This is tedious and inconsistent with other similar utilities like kubectl, docker, etc.

Should be like so..

argocd app logs my-app -c my-container -f --tail 100

So that it's consistent with other cli tools, like so
kubectl logs my-pod -c my-container -f --tail 100

Proposal
How do you think this should be implemented?

Just changed the flag type from BoolVar and StringVar to BoolVarP and StringVarP respectively.

// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.

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

No branches or pull requests

1 participant