grc icon indicating copy to clipboard operation
grc copied to clipboard

the tty's size is ignored

Open vikstrous opened this issue 9 years ago • 7 comments

It's very obvious when running ps aux that the tty's size is ignored by grc. Cope doesn't seem to have this problem. I'm guessing that is emulates a tty?

vikstrous avatar Feb 10 '16 07:02 vikstrous

Can you send me the details of your OS? tty size should not be ignored, only the changes during the execution of grc. What does grc resize say?

In particular, I see no problems with ps aux.

garabik avatar Feb 10 '16 07:02 garabik

I'm using fish and urxvt. grc resize reports the correct numbers.

vikstrous avatar Feb 10 '16 07:02 vikstrous

I figured out what I was doing wrong. Specifying the config directly with --config=conf.ps was causing the issue. If I don't specify it, it seems to work.

vikstrous avatar Feb 10 '16 07:02 vikstrous

The same thing was causing #25 as well.

vikstrous avatar Feb 10 '16 07:02 vikstrous

Err... if I don't specify the config the output was colourized by cope because I have that installed too. Maybe my issues are related to running everything through both cope and grc.

vikstrous avatar Feb 10 '16 07:02 vikstrous

I see. ps ignores tty size if its output is not a terminal - try ps aux|cat to see the effect. I am (slowly) working on tty emulation, hopefully that should fix the issue.

grc ps without --config was probably not colourising the output, because it did not recognise the ps command and therefore ps had been executed directly.

garabik avatar Feb 10 '16 07:02 garabik

Hmm... sorry for all the confusion. Looks like I CAN reproduce this easily this way:

grc --config=conf.ps /usr/bin/ps aux

so, yeah, I guess when there was no config the output was the tty, not grc, so that's why it worked and in my case it was coloured because I accidentally ran the cope executable.

#25 is separate and still valid

vikstrous avatar Feb 10 '16 07:02 vikstrous