I often find myself piping a command's output into less
because less
is far superior for studying the output than the normal terminal.
While I can always append | less
to every command, I was wondering if there is a more concise way of doing this requiring fewer keystrokes.
One option would be to alias less
allowing me to type |L
instead of |less
.
Is there a smarter way? Like binding | less
to a certain key combination?
I use fish
but answers for zsh
and bash
are equally welcome, though more generic ones are preferred.
alias p=less
myself (mnemonic: p for "pager") -- p is close to the pipe on the keyboard.P
and|
(Shift+\
) keys couldn't be further apart.