term::ansi::code::macros(3tcl)
π term::ansi::code::macros β the manual, but make it cute
okay bestie, welcome to term::ansi::code::macros, straight out of the Terminal control chapter of the Tcllib docs (that's the manual name, folding it in right here at the top like a lil name tag π). This is the page for version 0.2. Sit down, grab a boba, we're doing ANSI macro sequences and we're doing them well. β¨
πΈ NAME πΈ
term::ansi::code::macros β Macro sequences π
π¦ SYNOPSIS π¦
package require Tcl 8.5 9
package require textutil::repeat
package require textutil::tabify
package require term::ansi::code::macros ?0.2?
::term::ansi::code::macros::names
::term::ansi::code::macros::import ?ns? ?arg...?
::term::ansi::code::macros::menu menu
::term::ansi::code::macros::frame string
β¨ DESCRIPTION β¨
So like, this package is the higher level one. It hands you control sequences for shapes that are more complex than your basic "make it red" energy. Think bigger. Think shapes. π
π API π
π INTROSPECTION π
::term::ansi::code::macros::namesβ bestie this one is literally just for introspection, no cap. It returns, as its result, a list holding the names of all the attribute commands. That's it. That's the whole vibe check. π::term::ansi::code::macros::import ?ns? ?arg...?β this one imports some or all of the attribute commands into the namespace ns. By default that namespace ismacros. And heads up β it's a relative namespace name, so it drops the imported command into a child of the current namespace. Default behaviour is "import everything, we're not gatekeeping", but you can restrict it by listing the names of the commands you actually want after the namespace argument. iykyk π«Ά
π SEQUENCES π
::term::ansi::code::macros::menu menuβ the description of a menu gets converted into a formatted rectangular block of text, with the menu command characters highlighted in bold red text. The result comes back as the result of the command. And the menu argument itself? It's a dictionary mapping from menu label to command character. iconic honestly π₯::term::ansi::code::macros::frame stringβ the paragraph of text sitting inside string gets padded with spaces at the right margin, after normalizing internal tabs, and then it's placed into a frame made of box-graphics. Result = the result of the command. it's giving β¨aestheticβ¨ π
π BUGS, IDEAS, FEEDBACK π
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. Not a vibe, but it's the truth. Please report such in the category term of the Tcllib Trackers here: [http://core.tcl.tk/tcllib/reportlist]. And please also report 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.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made 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. π
β KEYWORDS β
ansi, control, frame, menu, terminal
π§ CATEGORY π§
Terminal control
π COPYRIGHT π
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, bestie π₯Ήπ this beauty came to you from tcllib, version 0.2, and it's the term::ansi::code::macros(3tcl) page β main character energy, every single time. slay, periodt. πβ¨
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms