12.21.2024

01.13.2011

Prevent man, nano from Clearing Screen on Exit in Terminal.app

Filed under: note to self @ 12:42
$ mkdir ~/.terminfo
$ infocmp > ~/.terminfo/xterm-color-noclear.terminfo
$ nano ~/.terminfo/xterm-color-noclear.terminfo
# 1. Change 'xterm-color' on second line to 'xterm-color-noclear'
# 2. Remove 'smcup' and 'rmcup'
$ tic ~/.terminfo/xterm-color-noclear.terminfo
$ export TERM=xterm-color-noclear
# Add export line to .profile

More info at: Synologic’s Stop gnome-terminal screen clear, Fix Log’s Stop gnome-terminal screen clear, and The Shallow Sky’s Exorcising the Evil Alternate Screen.

Update

I had to turn this off since it was affecting ssh terminals. Will revisit.

$ nano
Error opening terminal: xterm-color-noclear.

2 Comments

  1.  
    Schwangerschaft 02.21.2011 @ 17:43

    $ infocmp > ~/.terminfo/xterm-color-noclear.terminfo
    $ nano ~/.terminfo/xterm-color-noclear.terminfo
    # 1. Change ‘xterm-color’ on second line to ‘xterm-col…. is this one correct? I didnt see xterm color

  2.  
    Anonymous Coward 09.07.2011 @ 18:16

    Iff you’re still getting that error, I think this can solve it.

    HTH

© mdawaffe (Michael D Adams) - Powered by WordPress - Full Credits