3

I am compiling using g++ and the output scrolls many pages. On Unix/Linux I was able to achieve it using pipeline and "more".

qqqqq
  • 165
  • 6

1 Answers1

0

On Unix/Linux I was able to achieve it using | more.

Unfortunately git bash does not come with more installed by default.

However, less is more. (pun intended)

You can choose to install more or use | less instead (which is included in git bash):

less

Page through text one screenful at a time, Search through output, Edit the command line. less provides more emulation plus extensive enhancements such as allowing backward paging through a file as well as forward movement.

Source less Man Page - Linux - SS64.com

You can also use an alias to define more:

alias more="less -de"

Adding -d for --dumb and -e for --quit-at-eof makes this alias closed to what more does by default.

Put this alias in %USERPROFILE%/.bashrc

Source Why can't I use “more” command in Git Bash?, answer by VonC

DavidPostill
  • 153,128
  • 77
  • 353
  • 394