<<< Date Index >>>     <<< Thread Index >>>

Re: Subject üî



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, September  4 at 11:26 PM, quoth Kyle Wheeler:
> Speaking of which, any idea how to get it to behave in a more 
> xterm-like fashion? Namely, when I exit a program (such as man or 
> less or mutt), I like that xterm restores the terminal to what was 
> on it before I launched whatever program. With TERM=nsterm (or 
> nsterm+mac), the image of mutt (or man, or less, or...) stays on the 
> terminal after I quit, and I hate that.

AHA! I found it. Sorry for the noise, but this is *excellent*, and I 
wanna add it to the list archive.

Essentially, nsterm-16color is in the *latest* ncurses library, and 
only applications that link against said library can use it. I used 
the following command to steal the source from my self-installed 
(macports, though the same would work for having installed it most 
other ways) ncurses library:

     infocmp nsterm-16color > /tmp/nsterm-16color.src

Then, after examining the termcap database, and knowing that the 
strings that do this are suppressed by the xterm titeInhibit 
preference, I found the ti and te strings (which are modified by that 
preference). Those strings, in terminfo parlance, correspond to smcup 
and rmcup strings, so I added them:

     echo 'smcup=\E7\E[?47h,' >> /tmp/nsterm-16color.src
     echo 'rmcup=\E[2J\E[?47l\E8,' >> /tmp/nsterm-16color.src

Then, recompile into my local database (~/.terminfo/n/nsterm-16color):

     tic /tmp/nsterm-16color.src

And presto! Mutt doesn't leave a copy of itself on the terminal after 
it exits.

All I need to figure out now is how to make programs that use the 
built-in ncurses (e.g. /usr/bin/less) use the ~/.terminfo database. It 
doesn't seem to respect TERMINFO, even though its documentation says 
that it should.

~Kyle
- -- 
People who would give up their Freedom for security deserve neither.
                                                   -- Benjamin Franklin
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFG3klTBkIOoMqOI14RAvuGAJ4iu30UbgXbO6w+NuxBu1hHIg80IQCePZH8
VZ7O4evqiYrWa0EUI7UNvEg=
=lemA
-----END PGP SIGNATURE-----