All output to terminal pager by default

How can I have all my output to a terminal pager by default.
I want all output to pause once screen is full.

Piping to more does not work if the app/script is interactive

You could write all 'output' between interactions into files or pipe to pager, print them, followed by the interaction command, then print the next according file to pager, etc.
Issue remains, while within the pager, the user cannot do interactions.

My question is this much output really required for interactions?
As example, make a detailed --help , --docs --manpage output that is printed to ${PAGER:-more} (bash).
Then focus on the interactions on 'minimal' output to describe what is done with the user input.

Last but not least, you could write your own output function, checking $LINES for the max lines displayed, and then count each line printed, then echo "press enter to continue";read buffer to continue after setting the line count to 0.

hth

If you're saying that you want to type characters into your terminal and magically have the system guess which characters you type are supposed to be read by a pager and which characters you type are supposed to be read by the application that is sending data to the pager; that isn't going to happen. If you have two programs concurrently reading characters from your terminal, havoc is almost guaranteed. :eek:

With more and some other pagers, if standard output is a terminal, the pager will read user interaction input from standard error. So, you could rewrite your application to read application and pager commands from standard input and forward commands for the pager to the pager using a pipeline it connects to the pager's file descriptor 2. (Note that standard error from the pager in this case is a read-write channel [not write-only] and your application needs to be prepared to forward any diagnostics written by the pager to the user somehow [remembering that output being sent to the terminal is being controlled by the pager; not by your application].)