term::ansi::code::macros(3tcl)

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

πŸ’… 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 is macros. 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 (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