-
Notifications
You must be signed in to change notification settings - Fork 0
cli/command: ps: only check format-template once #1
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
cli/command: ps: only check format-template once #1
Conversation
|
@photra ptal; if you agree with these changes, and merge this PR, it will be included in your PR |
|
Hi @thaJeztah, I just made some suggestions to above for conciseness. Please let me know what you think about it! 😁 |
9d1b7a0 to
c51ef56
Compare
|
@photra I pushed a change; added one extra commit in which I fixed the logic in |
- do an early check if a custom format is specified either through the command-line, or through the cli's configuration, before adjusting the options (to add "size" if needed). - if no format is set after this, set the default (formatter.TableFormatKey) - also removes a redundant `options.Size = opts.size` line, as this value is already copied at the start of buildContainerListOptions() - Update NewContainerFormat to use "table" format as a default if no format was given. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c51ef56 to
94fd3d9
Compare
|
Actually, perhaps we should do the last commit as a follow-up for visibility; let me remove it for now (and I can push it as a separate PR); possibly it needs discussion as there will be a slight change in behavior, which may need discussion. I removed the commit, and included some of the change in the existing one 👍 |
|
Gotcha, merging this PR now! |
command-line, or through the cli's configuration, before adjusting
the options (to add "size" if needed).
options.Size = opts.sizeline, as this value isalready copied at the start of buildContainerListOptions()