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

pager support #59

Open
anarcat opened this issue Feb 25, 2018 · 1 comment
Open

pager support #59

anarcat opened this issue Feb 25, 2018 · 1 comment

Comments

@anarcat
Copy link

anarcat commented Feb 25, 2018

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.

@anarcat
Copy link
Author

anarcat commented Feb 26, 2018

I just noticed that the DoubleTable style outputs unicode in Linux, so I have switched to that now, but maybe the same should be done for the SingleTable style?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant