-
Notifications
You must be signed in to change notification settings - Fork 96
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
feature request: abbreviated truncated views #38
Comments
Since the count might be confused with an actual value, what if you appended
Another approach would be to show the count next to the braces e.g
The latter approach is how the JSON Formatter extension for chrome handles collapsed nodes. |
Hmmm, I initially didn't like the added busy-ness of having "items" all over the place, and also the terminal coloring makes it very clear what is a preview and what is not. But I don't like assuming terminal coloring will fix everything, and I did stumble across one case where it is ambiguous without terminal coloring, and that's in
So I'll add "item"/"items". Good suggestion, thanks @ducaale. In fact, since line mode relies on single-line previews, I've disabled
|
Would it be possible to add a command line option to render the truncated strings as just a count (key-value pairs for objects, array elements for arrays)? For example, here's what
jless
currently says withhttps://api.github.com/repos/PaulJuliusMartinez/jless/commits
:I have a tool of my own for viewing JSON that shows the same structure like so:
While I don't need an exact match, I figure that
jless
could (optionally) produce something like:I'm happy to give this a try if you could point me to a starting place. I know zero rust, but am familiar with lots of other languages. It looks like
lineprinter.rs:fill_in_value()
is where these labels are generated, and maybe from there intotruncatedstrview.rs
, but I quickly got lost in there.The text was updated successfully, but these errors were encountered: