jless icon indicating copy to clipboard operation
jless copied to clipboard

Different preview modes: full, count, none

Open brewingcode opened this issue 3 years ago • 3 comments

Adds two new ways to preview child nodes (only in --mode line, doesn't affect --mode data).

The existing single way full:

image

The first new way count shows objects as { N items }, where N is the number of key-value pairs. It shows [ N items ] for arrays.

image

The second new way none just removes the child counts/previews entirely:

image

Closes #38

brewingcode avatar Feb 16 '22 18:02 brewingcode

This PR could also close #37, which asks to just hide the previews.

It might also close #33, which asks the previews to be rendered conditionally. Maybe just switching from the full previews to a count-of-children would be sufficient for that issue's purposes.

brewingcode avatar Feb 16 '22 21:02 brewingcode

See https://github.com/PaulJuliusMartinez/jless/issues/38#issuecomment-1044974865 for a bit more context around 6f71ce0 and 26a6059

brewingcode avatar Feb 18 '22 19:02 brewingcode

Is there a ETA on this PR? 🙂

hacker-DOM avatar Sep 28 '23 16:09 hacker-DOM