bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62958: [PATCH] Set PAGER=cat in comint.el


From: Gregory Heytings
Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el
Date: Fri, 12 May 2023 22:21:19 +0000


I will definitely customize the new option 'comint-pager' to "cat" as soon as it arrives to master. But for such cases when some commands produce too long output, would it be also possible to provide an additional option to set the number of lines to output before stopping?

Did you try "cat | head -N"?

Now I tried out, and it works as expected. Only there is no indication that the output is truncated. But probably such indication is not important with overly long output.


If you want such an indication, I suggest using sed instead of head:

cat | sed -e "<N>aOUTPUT TRUNCATED" -e "<N>q"

(Of course, replace <N> with the number of lines of output you want. And of course you can replace the string "OUTPUT TRUNCATED" with whatever you want.)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]