grc icon indicating copy to clipboard operation
grc copied to clipboard

grc not working with less +F

Open Jeansen opened this issue 7 years ago • 2 comments

grc -c my.conf less -F some.log does not work as expected. The output is shown until the end of the file and not waiting for new lines to be added. This should work/behave the same way as grc -c my.conf tail -f some.log.

Jeansen avatar Aug 01 '18 12:08 Jeansen

Not waiting for new lines to be added?

How do you mean? Tail isn't interactive, while less will just print everything if it determines you have a dumb terminal (although I haven't tried with -F). You can try with --pty, but I'm having issues with that since I don't think GRC does anything about special console control characters. I'm working on a patch /alternate tool for my own use that might fix the behaviour that you're talking about, if I'm understanding you correctly.

haydenflinner avatar Aug 12 '18 14:08 haydenflinner

@haydenflinner: What I mean is, that in the case above the logfile just runs through less and I am back to my terminal prompt. Neither can I page through with less (as it would be the normal case), nor does less behave as expected with the -F option. A workaround at the moment is to call less without the -F option and invoke it from within the less session with <Shift>-F. That seems to work, so far.

Jeansen avatar Aug 12 '18 20:08 Jeansen