@ -31,6 +31,9 @@ if {"windows" eq $::tcl_platform(platform)} {
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++
namespace eval punk::console {
variable has_twapi 0
variable previous_stty_state_stdin ""
variable previous_stty_state_stdout ""
variable previous_stty_state_stderr ""
#punk::console namespace - contains *directly* acting functions - some based on ansi escapes from the 'ansi' sub namespace, some on local system calls or executable calls wrapped in the 'local' sub namespace
#directly acting means they write to stdout to cause the console to peform the action, or they perform the action immediately via other means.
@ -72,13 +75,26 @@ namespace eval punk::console {
proc enableAnsi {} {
#todo?
}
#todo - something better
proc enableRaw {{channel stdin}} {
variable previous_stty_state_$channel
set sttycmd [auto_execok stty]
set previous_stty_state_$channel [exec {*}$sttycmd -g <@$channel]