some terminal command doesn't release prompt and need ": q" to exit

Viewed 17

i'm using oh-my-zsh and terminal command on VSCODE or iTerm on macos machine.

some commands doesn't release or exit ( i have no idea how it's called sorry )

for example

git status print the status and i can input other command after it. git branch print the branch but i have to do press control + C + ": q" to exit . few times ago it print the text and i can input other commands without ": q"

any one have an idea from where it can come or fix ?

thanks

1 Answers

Based on the fact that git status works fine, but git branch sometimes doesn't, I'm going to guess that you've got your git pager set to something vi-like.

That is: the output from git status is usually pretty short, but the output from git branch takes more than one screenful, and needs scrolling.

What do the following commands show?

echo $PAGER
git config --get core.pager

For more about git paging, you could start here: https://medium.com/pragmatic-programmers/git-config-core-pager-807e17d64243

Related