ponysay icon indicating copy to clipboard operation
ponysay copied to clipboard

Ponysay on TTY *always* truncates on height / no color reset

Open lapsio opened this issue 8 years ago • 4 comments

Ponysay under TTY always truncates terminal output. It breaks my rc scripts which are printing server status info above pony. It's especially annoying if you consider that bare TTY in production environment is only accessed when something bad happens so truncating log makes already bad mood even worse, no matter how much stress ponies in terminal release.

Whereas there is option to force enable truncate under non-TTY there's no option to disable it under TTY. I tried explicitly setting set -x PONYSAY_TRUNCATE_HEIGHT 0 but it doesn't work.

Also ponysay seems to improperly reset color palete on TTY (it's actually good tho because some machines have really dark colors in fish shell so ponysay makes highlighted output actually readable, that's tbh why I use it on TTY in the first place)

lapsio avatar Jun 23 '17 23:06 lapsio

The 'no color reset' is unintentional but I think the infopage mention a workaround that maybe can be applied to other programs too.

Now the truncation maybe @maandree could enlightenment us if that intentional or not (I think the variable ignoring is a bug) since he write the python script.

JotaRandom avatar Jul 02 '17 02:07 JotaRandom

I did the PR #263 but as I mentioned in it BSD and ToaruOS dont look like have those files, for the other side a simple solution should be the old if linux else a fallback,

JotaRandom avatar Jul 24 '17 00:07 JotaRandom

how about truncate?

lapsio avatar Jul 24 '17 11:07 lapsio

Truncating work using the exposed stty as talked on #254 but aparently set -x PONYSAY_TRUNCATE_HEIGHT 0 got override somewhere.

I'm waiting for comments on #254 about using TIOCGWINSZ against os.get_terminal_size() and hope probably we can find if was stty the culprint on the overriding or just the issue is on how ponysay detect the environments.

JotaRandom avatar Jul 25 '17 06:07 JotaRandom