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.

5 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

  3.  

    Many people are confused about the different types of baseball shoes used by ball players and more specifically, the use of turf shoes.

  4.  
    Deanna Worcester 01.18.2012 @ 21:34

    I cannot thank you enough for the blog post. Great.

  5.  
    Never Wet 02.07.2012 @ 08:43

    Interesting problem, I had similar one, but after such long time I assume you have solved it. Thanks to anonymous coward.

Leave a Reply

Comment Moderation is on; comments with spammy words or a few links might be delayed. Don't worry, they'll get posted soon. If you think something has gone terribly wrong, contact me.

Line and paragraph breaks are inserted automatically and e-mail addresses are never displayed. You may use the following HTML tags in your comments.

<a abbr acronym b blockquote cite code del em i q strike strong>

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