Equivalent of 'more' or 'less' command in Powershell?

后端 未结 12 2071
小蘑菇
小蘑菇 2020-12-13 01:38

Is there a way to paginate the output by piping it to some \'more\' command, which is available in linux\\unix shells?

12条回答
  •  盖世英雄少女心
    2020-12-13 02:03

    I prefer the "less" command over the "more" command. With the less command, results can also be paged backwards instead of just forwards.

    The "less" from Git for Windows works for me*

    To save typing I added the alias "l" for less in my Powershell profile (notepad $profile):

    sal l "C:\Program Files (x86)\Git\bin\less.exe"

    Look for less either in the above path or C:\Program Files\Git\usr\bin\less.exe or similar.


    *: I had errors in Powershell with the Gow version of "less".

提交回复
热议问题