lish icon indicating copy to clipboard operation
lish copied to clipboard

pagers and piping

Open bendudson opened this issue 7 years ago • 1 comments

Piping into more or less does not seem to work as expected.

$ less lish.lisp

displays pages as in Bash, but

$ cat lish.lisp | less

does not display any text, whilst more displays the first page of text.

Using a simple C code in place of less, isatty returns the same when used under Lish or Bash.

p.s. Thanks for all the documentation!

bendudson avatar May 26 '18 22:05 bendudson

Ah! You found a bug that happens to run very deep. I do know about it, but I'm now reminded why I haven't fixed it yet. The proper fix to this requires quite a significant amount of plumbing work. I think I really should get about doing it now.

BUT, there is a simple work-around, which is a bit of cheat. I happened to have written a pager in Lisp that is more-or-less compatible with less. So if you just say:

Lish> alias less pager

it shouldn't be too different than expected.

Hopefully the differences will not be too annoying until I can put together the real fix. The explanation is fairly long, but if you're curious I could outline it.

nibbula avatar May 27 '18 17:05 nibbula