2

If a list is generated that is too long for the height of the open Command Prompt window (like this long list of branches), it gets stuck here. It first shows what could fit in the window, then :, and if you press you will get to the end of the list and it says (END)

How does one escape this to continue working? Ctrl+C does not work, Esc also does not work. Currently, my only solution is to close the window, reopen, and try to make it as tall as possible before running that command.

Screenshot example:

phuclv
  • 37,963
  • 15
  • 156
  • 475
PolarisTLX
  • 329
  • 4
  • 18

2 Answers2

4

You always escape this with the q key which means quit.

However, usually you must be able to exit with Ctrl+C, e.g. type more C:\Windows\bfsvc.exe. You can't escape that with Esc, but with Ctrl+C and q.

Git is usually an exception to these.

double-beep
  • 5,031
  • 17
  • 33
  • 41
1

I've always used git in bash so I'm not sure how can the behavior in cmd can be different, maybe just because git has handled the Ctrl+C signal, but from more /?

If extended features are enabled, the following commands
are accepted at the -- More -- prompt:

P n     Display next n lines
S n     Skip next n lines
F       Display next file
Q       Quit
=       Show line number
?       Show help line
<space> Display next page
<ret>   Display next line

that said, I'm able to quit a more prompt with Ctrl+C in my cmd

In bash more also used vi-like commands so q is the shortcut to quit, too

However having such a long list of branches is not a good idea. Once pushed to the remote you can delete the branch and checkout again anytime in the future. You should also regularly deletes branches that were no longer necessary

phuclv
  • 37,963
  • 15
  • 156
  • 475