Talk:Terminal control/Preserve screen: Difference between revisions

Content added Content deleted
(So this draft task doesn't have any successful impls at all?)
(→‎The Unix solution: new section)
Line 10: Line 10:


:: So the Javascript code (which preserves the browser state, not a terminal) is way off? It's rare for Javascript engines to be connected to a real terminal in any useful way. –[[User:Dkf|Donal Fellows]] 22:03, 2 May 2011 (UTC)
:: So the Javascript code (which preserves the browser state, not a terminal) is way off? It's rare for Javascript engines to be connected to a real terminal in any useful way. –[[User:Dkf|Donal Fellows]] 22:03, 2 May 2011 (UTC)

== The ''Unix'' solution ==

The Tcl solution is really a solution for Unix. On that platform, either use the curses library (or one of its successors) or run the program “tput smcup” to save the screen (the documentation says “enable cursor positioning mode” but that's less than helpful) and run “tput rmcup” to restore the old one. And you wouldn't believe how ''awkward'' it was to search for the right termcap code; huge amounts of irrelevant noise from people talking about how to control xterm and how to use GNU screen. Use the knowledge I have gathered for good, not evil! –[[User:Dkf|Donal Fellows]] 23:14, 2 May 2011 (UTC)