Closed ronny-rentner closed 2 years ago
No CLI option, but pressing down arrow before filling the first screen will make moar
start following as soon as the first screen fills up.
Please try this out and see if it works for you!
There are some limitations here, and I need to know whether or not you're running into those.
Thanks for the swift implementation. It works as expected but the missing CLI option is causing trouble.
I am using it like this:
unbuffer journalctl -fn 1000 |moar
I have a bash alias for this.
Not having a CLI option forces me to do an additional key press each time I want to see the journal and follow it.
I've tried somehow sending the End
key to the moar process in addition from the bash alias but as I am already using a pipe this is not working, yet.
Brilliant, thank you so much, it works like a charm.
The final bash alias I am using now is:
alias jcf='moar --follow < <(unbuffer journalctl -fe)'
In my opinion, this is a real USP for moar as no other pager I have tried can follow the output but also scroll up if you want. I've tried many different pagers including the classical more and less, but also most, batcat and the journalctl built in pager.
PS: I needed to use the above bash process substitution so pressing q
in moar will also correctly end the journalctl process.
Thank you for your kind words @ronny-rentner. I took the liberty of linking to your comment from the README.
Of course. For the interested reader, the unbuffer
command is part of the expect
package on Debian. It's needed to trick journalctl into giving us colors.
When scrolled to the very bottom, I suggest that moar follows the output if new lines are added.
It would also be great if there was a cli option to start at the end of the file or stream in follow mode.