Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

pager support #59

@anarcat

Description

@anarcat

A bug report (#891381) was filed against the undertime Debian package, which uses this library, because it doesn't support piping the SingleTable through less or similar pagers.

I can confirm that terminaltables seriously garbles the terminal when piped into a pager:

[1015]anarcat@curie:~$ undertime | less 
qqqqqqqk
  EST  
qqqqqqqu
 00:00 
 01:00 
 02:00 
 03:00 
 04:00 
 05:00 
 06:00 
 07:00 
 08:00 
 09:00 
 10:00 
 11:00 
 12:00 
 13:00 
 13:12 
 14:00 
 15:00 
 16:00 
 17:00 
 18:00 
 19:00 
 20:00 
 21:00 
 22:00 
 23:00 
└───────┘
[1016]▒┼▒⎼␌▒├@␌┤⎼␋␊:·$ 

This requires a reset to get fixed.

One suggested fix was to send "proper" unicode or ANSI escape sequences to avoid freaking out pages like less. There are three pending pull requests to implement the former: #42, #47 (which supersedes #42) and #50. I haven't tested if those fix the issue, but it would be great to have a solution for this implemented somehow, so I figured I would document the issue to facilitate the tracking across projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions