Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does “~ (END)” mean when displayed in a terminal?

Tags:

git

terminal

I'm running through the gitimmersion.com labs and every time I run a: git hist --all command it seems to break terminal and throw this:

~
~
~
~
(END)

and I'm not able to type any more commands. So I end up closing that terminal window and starting over.

Anyone know why this happens and how to resolve it?

Thanks!

like image 623
sigmapi13 Avatar asked Jun 29 '12 11:06

sigmapi13


People also ask

What does '$' mean in Linux?

BASICS. Syntax for this manual. Remember the UNIX/LINUX command line is case sensitive! "$" indicates start of command. "#" indicates end of command and start of comment.

What does & at the end of a command mean?

The trailing & operator at the end of a command is used to put commands into background. This is actually a standard syntax specified by POSIX standard: Asynchronous Lists. If a command is terminated by the control operator ( '&' ), the shell shall execute the command asynchronously in a subshell.

What does at the end of a Linux command mean?

If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0. Follow this answer to receive notifications.


2 Answers

Git pipes long output into what's called a pager by default, which can make it easier to view the output if it doesn't fit on a screen. The ~ characters indicate that those lines were not in the original output, but it's showing them so that you can scroll down past the bottom (i.e. the last line of output can go up to the top of the screen).

You typically can use the arrow keys to scroll up or down, and can exit by pressing q.


Alternatively, if you don't want the output in a pager, try this:

$ git --no-pager hist --all 
like image 188
vergenzt Avatar answered Sep 17 '22 14:09

vergenzt


Taken from git help config

  core.pager        The command that git will use to paginate output. Can be overridden with the GIT_PAGER environment variable.        Note that git sets the LESS environment variable to FRSX if it is unset when it runs the pager. One can        change these settings by setting the LESS variable to some other value. Alternately, these settings can be        overridden on a project or global basis by setting the core.pager option. Setting core.pager has no affect        on the LESS environment variable behaviour above, so if you want to override git’s default settings this        way, you need to be explicit. For example, to disable the S option in a backward compatible manner, set        core.pager to less -+$LESS -FRX. This will be passed to the shell by git, which will translate the final        command to LESS=FRSX less -+FRSX -FRX. 

To skip a pager completely:

git config --global core.pager cat 

The -F flag to less is nice as it tells less to not page the output if it fits on one page.

like image 45
Fredrik Pihl Avatar answered Sep 18 '22 14:09

Fredrik Pihl