term::ansi::code::macros(n)
β¨ term::ansi::code::macros β¨
okay bestie, so this page is term::ansi::code::macros(n) from the Terminal control manual section, and it's literally all about 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 basically this package is giving higher level control sequences for when you wanna draw more complex shapes π¦ like, the simple stuff isn't enough, you need the fancy terminal art, and this is where it lives. no cap.
π API π
π INTROSPECTION
::term::ansi::code::macros::namesβ this command is for introspection, which is a fancy way of saying "hey what's in here". It returns as its result a list containing the names of all attribute commands. that's it, that's the whole vibe β¨::term::ansi::code::macros::import ?ns? ?arg...?β this one imports some or all attribute commands into the namespace ns. And heads up bestie, by default that namespace ismacros. Important detail: this is a relative namespace name, so it places the imported command into a child of the current namespace. By default all commands are imported, but you can restrict that by listing the names of the wanted commands 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, and the menu command characters are highlighted using bold red text π₯. The result is returned as the result of the command.
And about that description β menu is a dictionary mapping from menu label to command character. iconic.
::term::ansi::code::macros::frame stringβ the paragraph of text contained in string gets padded with spaces at the right margin, after normalizing internal tabs (thank youtextutil::tabifyandtextutil::repeatπ§), and then it's put into a frame made of box-graphics π¦β¨. The result is returned as the result of the command. it's giving cozy little text box.
π BUGS, IDEAS, FEEDBACK π
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. Please report such in the category term of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. Also please report any ideas for enhancements you may have for either package and/or documentation β we wanna hear it π
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. periodt.
π 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, slay π β¨
this was tcllib version 0.2, part of the term::ansi::code::macros(n) manual, and yeah the date in the footer is the same 0.2 era vibe β go forth and make your terminal pretty π¦π
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- 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