TERM=xterm lacking smcup and rmcup (alternate screen)

Sebastian Gniazdowski sgniazdowski at gmail.com
Wed Jan 6 18:38:58 UTC 2016


Hello
I want to criticize an approach taken in FreeBSD regarding the
alternate screen. It's not available in newcons. One person wrote
that's because Tekken doesn't have such feature, and newcons
implements Tekken.

That's maybe fine. However, newcons doesn't have it's own termcap. It
uses TERM=xterm, which normally has rmcup and smcup. Some smart person
thus decided to remove those codes from TERM=xterm. You see what this
leads to? No alternate screen on X11.

Why doesn't newcon create it's own termcap entry? Why nobody cares
about trashed xterm screens when fullscreen applications are exiting.
In my software I've wrote a special function to handle FreeBSD nuance:

https://github.com/psprint/zsh-cmd-architect/blob/master/zca#L65-L81

But this should be fixed, really. Newcons could ignore rmcup and
smcup. Why remove them from TERM=xterm, let newcons just ignore it.
FreeBSD could then still use TERM=xterm for its virtual terminal.

Best regards,
Sebastian Gniazdowski


More information about the freebsd-questions mailing list