term::ansi::ctrl::unix(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– term::ansi::ctrl::unix β€” bestie edition πŸ’–

okay so this is the manual page for term::ansi::ctrl::unix, and the manual name it lives under is Terminal control. it's part of the Tcllib fam, it's giving "let me talk to your terminal" energy, and we're gonna go through it together. grab a strawberry πŸ“ and let's go.


✨ SYNOPSIS ✨

package require Tcl 8.5 9

package require term::ansi::ctrl::unix ?0.1.2?

::term::ansi::ctrl::unix::import ?ns? ?arg...?

::term::ansi::ctrl::unix::raw

::term::ansi::ctrl::unix::cooked

::term::ansi::ctrl::unix::columns

::term::ansi::ctrl::unix::rows

🌸 DESCRIPTION 🌸

WARNING: this package is unix-specific and it literally depends on two unix system commands being available for terminal control, bestie: stty and tput. both of them have to be findable in your $PATH. if either one of these two commands is missing, loading the package will fail. no stty, no tput, no package. that's the vibe check and you failed it. πŸ’€

so what does it actually do? the package gives you commands to switch the standard input of the current process back and forth between raw and cooked input modes, and to query the size of terminals β€” as in, how many columns and how many lines you got to display with. iconic, honestly. πŸ‘‘


πŸŽ€ API πŸŽ€

πŸ” INTROSPECTION

  • ::term::ansi::ctrl::unix::import ?ns? ?arg...? β€” this command imports some or all of the attribute commands into the namespace ns. by default that namespace is ctrl. heads up though: this is a relative namespace name, so the imported commands land in a child of the current namespace, not some absolute place. by default, all the commands get imported β€” but you can restrict that by listing the names of the wanted commands after the namespace argument. pick and choose, main character style. πŸ’…

βš™οΈ OPERATIONS

  • ::term::ansi::ctrl::unix::raw β€” switches the standard input of the current process to raw input mode. what that means: from then on, every character the user types is immediately reported to the application instead of chilling in the OS buffer until the Enter/Return key shows up. instant delivery, no waiting room. ⚑
  • ::term::ansi::ctrl::unix::cooked β€” switches the standard input of the current process to cooked input mode. what that means: from then on, every character the user types is kept in OS buffers for editing until the Enter/Return key is received. so it waits. very patient of it. 🍲
  • ::term::ansi::ctrl::unix::columns β€” queries the terminal connected to the standard input for the number of columns available for display. how much horizontal room do we have, bestie? πŸ“
  • ::term::ansi::ctrl::unix::rows β€” queries the terminal connected to the standard input for the number of rows (aka lines) available for display. how tall are we talking. πŸ“

😭 BUGS, IDEAS, FEEDBACK 😭

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. it's giving "we are all just doing our best". please report them in the category term of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist. and please also drop any ideas for enhancements you may have for either the package and/or the documentation β€” we want them, fr fr. 🫢

when proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the format. respect the format. ✨

note further that attachments are strongly preferred over inlined patches. you can make an attachment by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. you got this. πŸ’–


πŸ”‘ KEYWORDS πŸ”‘

ansi, columns, control, cooked, input mode, lines, raw, rows, terminal


πŸ—‚οΈ CATEGORY πŸ—‚οΈ

Terminal control


Copyright (c) 2006-2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>


okay that's the whole page bestie!! πŸ¦‹ this one came from tcllib, version 0.1.2, and it's the term::ansi::ctrl::unix(3tcl) manual page β€” so now you know exactly who to thank and exactly what version you're reading. go forth and control some terminals, you absolute icon. πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from