I'd like to configure bash to page the output of all commands. Essentially, I want bash to behave as if every command I enter ended with '| less'. Is this possible?
bash – Configure Bash to Always Page Output
bashpagingshell
Related Topic
- Linux – How to run a command multiple times, using bash shell
- Linux – How to Prevent Accidental rm -rf /*?
- Bash – Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately
- Bash/sed/awk/etc remove every other newline
- Linux – way to make output from bash script visible in browser
- Linux – Bash Prompt Below Output – Background Log Tail
Best Answer
You could do this:
Or put this in your
~/.inputrc
:Then when you want to do
ls -l|less
you'd typels -l
and presscontrol-J
instead of<enter>
.I would not recommend swapping the j and m in the bind command (or in the .inputrc file). Every time you'd press
<enter>
you'd get|less
added which could be pretty annoying.