[cli] change the output format of sui client objects
to a well formatted table
#13869
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the way we show the output of the
sui client objects
command by using a well formatted table. For theobjectType
field, it mimics thetype
field from thesui explorer
. Use--json
for a more verbose & standard JSON output.Test Plan
Used the command, see screenshot (overlayed a black square on the addresses, version, digest).
![image](https://private-user-images.githubusercontent.com/135084671/270287079-37f9c044-651e-45bd-ab9e-7dc129259a09.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNjc3NzAsIm5iZiI6MTcyMzM2NzQ3MCwicGF0aCI6Ii8xMzUwODQ2NzEvMjcwMjg3MDc5LTM3ZjljMDQ0LTY1MWUtNDViZC1hYjllLTdkYzEyOTI1OWEwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxMVQwOTExMTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04Mzk2N2M1ODY5ODRkOTFkNGUxODIyMDljNDAxZjQwMDNmNGI5ZGEyNzI4NDViNjEyNmZhOGExNTdlNmIyZDU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.eefwy5vyAo2ZFBKVcWROvy49bThXnTW83ZiSLOTXXzU)
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
The displayed output from
sui client objects
is improved to show details in a well-formatted table. You can use the--json
flag to output a more verbose and standard JSON format.