Skip to content

console output no longer legible on narrow terminals or when piped #1361

@grr

Description

@grr

Expected behaviour:

Long field names should be truncated to fit on the terminal width. This was the previous behavior. Or the wrapping needs fixing. Also, the colorization should be disabled when piping the output (for example through less)

Actual behaviour:

Titles or other field names can be very long and cause the line to wrap and then the pretty borders that are on by default wrap oddly making it hard to read the distorted table output. I usually use 80-wide terminals, but even on a 150-wide terminal this happens if the field names are long enough (and they often are). The long field name does get wrapped, but it's very oddly done and doesn't make full use of the terminal width and the table itself wraps when the terminal is <= 113 chars. Here's a screenshot of what happens on a 150-wide terminal when the longest title is 106 characters: http://i.imgur.com/J3mSmEZ.png

Also there is an issue when colorized output is piped through less. By default less uses displays control characters like ^A, so maybe all colorization should be disabled when piping output. If using less -r the output appears ok, but if using less -R there are display artifacts indicating that the colorization is using sequences other than the standard ANSI color escape sequences.

Steps to reproduce:

With a terminal sized to 150-wide, and a downloaded title at 106 characters:
flexget history
flexget history | less
The colorization issue should be apparent when using:
flexget history | less -r
flexget history | less -R

  • Flexget Version: 2.3.4
  • Python Version: Python 2.7.12
  • Installation method: git
  • OS and version: OS X 10.11.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions