What does Terminal app's "Show Alternate Screen" do? (OS X)

38

8

Today, I discovered a menu item called "Show Alternate Screen" in Terminal.app. I am just curious about what it does. It seems to be sharing the same shell process (unlike tabs), since I see output from one screen on the other while a command is running (e.g. find .) and the current directory is kept in sync.

What is this feature and how is it useful?

Barum Rho

Posted 2011-08-10T03:03:38.667

Reputation: 535

Answers

26

The alternate screen is a concept that goes way back.

From the xterm man page:

In VT102 mode, there are escape sequences to activate and deactivate an alternate screen buffer, which is the same size as the display area of the window. When activated, the current screen is saved and replaced with the alternate screen. Saving of lines scrolled off the top of the window is disabled until the normal screen is restored. The termcap(5) entry for xterm allows the visual editor vi(1) to switch to the alternate screen for editing and to restore the screen on exit. A popup menu entry makes it simple to switch between the normal and alternate screens for cut and paste.

bahamat

Posted 2011-08-10T03:03:38.667

Reputation: 5 130