Skip to content

Make output truncation behavior more flexible #267

@rh-jkangas

Description

@rh-jkangas

(Feature request)

Currently commands like jmp get exporters truncate output based on the terminal width:

$ stty -a | head -1
speed 38400 baud; rows 30; columns 67; line = 0;
$ jmp get exporters -l device=nxp-s32g-vnp-rdb3-01
NAME                  LABELS
nxp-s32g-vnp-rdb3-01  board-type=nxp-s32g-vnp-rdb3,device=nxp-s32g…

But it'd be nice to have a couple of options here:

  1. If stdout isn't a terminal, don't truncate the output by default, like other CLI tools typically do.

  2. Allow overriding the default behavior from the command line. E.g., --width|-w (-1|positive_int). Manually overriding COLUMNS can also do this, although it feels a little hacky:

    $ COLUMNS=9999 jmp get exporters -l device=nxp-s32g-vnp-rdb3-01
    NAME                  LABELS
    nxp-s32g-vnp-rdb3-01  board-type=nxp-s32g-vnp-rdb3,device=nxp-s32g-vnp-rdb3-01,enabled=true,<snip>
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    usabilityuser-requestedThis label means, that actual users are requesting the feature and find it necessary/useful.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions