How to automatically pipe to less if the result is more than a page on my shell?

前端 未结 5 789
梦如初夏
梦如初夏 2021-02-01 03:41

Mostly, I will not use | less for each and every command from the shell.

Pipe to less is used only when I actually run the command without is and find out t

5条回答
  •  我在风中等你
    2021-02-01 03:59

    You could always pipe to less -E (this will cause less to automatically quit at the end of the file). For commands with short output it would do what you want. I don't think you can automatically pipe to less when there is a lot of output.

提交回复
热议问题