term::ansi::send(3tcl)
π term::ansi::send(3tcl) β Terminal control π
okay so bestie, welcome to the manual for term::ansi::send β it's giving Terminal control and it's literally the output of ANSI control sequences to terminals. No cap. π¦
β¨ NAME β¨
term::ansi::send β Output of ANSI control sequences to terminals. That's the whole vibe. It sends the fancy escape codes that make your terminal do cute little tricks. π
π SYNOPSIS π
First things first, you need Tcl and the package. Like:
package require Tcl 8.5 9
package require term::ansi::send ?0.2?
Then it's a whole menu of procs. Here's every single one, exactly as they come, no edits, no cap:
::term::ansi::send::import ?ns? ...
::term::ansi::send::eeol
::term::ansi::send::esol
::term::ansi::send::el
::term::ansi::send::ed
::term::ansi::send::eu
::term::ansi::send::es
::term::ansi::send::sd
::term::ansi::send::su
::term::ansi::send::ch
::term::ansi::send::sc
::term::ansi::send::rc
::term::ansi::send::sca
::term::ansi::send::rca
::term::ansi::send::st
::term::ansi::send::ct
::term::ansi::send::cat
::term::ansi::send::qdc
::term::ansi::send::qds
::term::ansi::send::qcp
::term::ansi::send::rd
::term::ansi::send::elw
::term::ansi::send::dlw
::term::ansi::send::eg
::term::ansi::send::lg
::term::ansi::send::scs0 tag
::term::ansi::send::scs1 tag
::term::ansi::send::sda arg...
::term::ansi::send::sda_fgblack
::term::ansi::send::sda_fgred
::term::ansi::send::sda_fggreen
::term::ansi::send::sda_fgyellow
::term::ansi::send::sda_fgblue
::term::ansi::send::sda_fgmagenta
::term::ansi::send::sda_fgcyan
::term::ansi::send::sda_fgwhite
::term::ansi::send::sda_fgdefault
::term::ansi::send::sda_bgblack
::term::ansi::send::sda_bgred
::term::ansi::send::sda_bggreen
::term::ansi::send::sda_bgyellow
::term::ansi::send::sda_bgblue
::term::ansi::send::sda_bgmagenta
::term::ansi::send::sda_bgcyan
::term::ansi::send::sda_bgwhite
::term::ansi::send::sda_bgdefault
::term::ansi::send::sda_bold
::term::ansi::send::sda_dim
::term::ansi::send::sda_italic
::term::ansi::send::sda_underline
::term::ansi::send::sda_blink
::term::ansi::send::sda_revers
::term::ansi::send::sda_hidden
::term::ansi::send::sda_strike
::term::ansi::send::sda_nobold
::term::ansi::send::sda_noitalic
::term::ansi::send::sda_nounderline
::term::ansi::send::sda_noblink
::term::ansi::send::sda_norevers
::term::ansi::send::sda_nohidden
::term::ansi::send::sda_nostrike
::term::ansi::send::sda_reset
::term::ansi::send::fcp row col
::term::ansi::send::cu ?n?
::term::ansi::send::cd ?n?
::term::ansi::send::cf ?n?
::term::ansi::send::cb ?n?
::term::ansi::send::ss ?s e?
::term::ansi::send::skd code str
::term::ansi::send::title str
::term::ansi::send::gron
::term::ansi::send::groff
::term::ansi::send::tlc
::term::ansi::send::trc
::term::ansi::send::brc
::term::ansi::send::blc
::term::ansi::send::ltj
::term::ansi::send::ttj
::term::ansi::send::rtj
::term::ansi::send::btj
::term::ansi::send::fwj
::term::ansi::send::hl
::term::ansi::send::vl
::term::ansi::send::groptim str
::term::ansi::send::clear
::term::ansi::send::init
::term::ansi::send::showat row col text
β¨ DESCRIPTION β¨
okay so this package gives you commands that yeet ANSI terminal control sequences straight to a terminal. π Every command comes in two variants: one that sends to any channel, and one that sends to stdout. slay.
The commands are built from the control sequences from term::ansi::code::ctrl. They take the same arguments as the commands they're based on, except for the any-channel variant β that one always takes a channel handle first, then the original args. Below we're only listing the stdout variant, bestie. π«Ά
::term::ansi::send::import ?ns? ...β Imports the commands of this package into the namespace ns. If you don't specify it, it defaults tosend. Heads up: that default is a relative namespace name, so the actual namespace gets created under the current namespace. By default all commands get imported, but you can restrict it to specific commands by listing them after the namespace you're importing into. π
π«Ά The Command Lineup π«Ά
::term::ansi::send::eeolβ Erase (to) End Of Line. β¨::term::ansi::send::esolβ Erase (to) Start Of Line. β¨::term::ansi::send::elβ Erase (current) Line. β¨::term::ansi::send::edβ Erase Down (to bottom). β¨::term::ansi::send::euβ Erase Up (to top). β¨::term::ansi::send::esβ Erase Screen. β¨::term::ansi::send::sdβ Scroll Down. β¨::term::ansi::send::suβ Scroll Up. β¨::term::ansi::send::chβ Cursor Home. β¨::term::ansi::send::scβ Save Cursor. Note: Only one saved position can be handled. This is no unlimited stack. Saving before restoring will overwrite the saved data. π::term::ansi::send::rcβ Restore Cursor (Unsave). β¨::term::ansi::send::scaβ Save Cursor + Attributes. β¨::term::ansi::send::rcaβ Restore Cursor + Attributes. β¨::term::ansi::send::stβ Set Tab (@ current position). β¨::term::ansi::send::ctβ Clear Tab (@ current position). β¨::term::ansi::send::catβ Clear All Tabs. β¨::term::ansi::send::qdcβ Query Device Code. β¨::term::ansi::send::qdsβ Query Device Status. β¨::term::ansi::send::qcpβ Query Cursor Position. β¨::term::ansi::send::rdβ Reset Device. β¨::term::ansi::send::elwβ Enable Line Wrap. β¨::term::ansi::send::dlwβ Disable Line Wrap. β¨::term::ansi::send::egβ Enter Graphics Mode. β¨::term::ansi::send::lgβ Exit Graphics Mode. β¨::term::ansi::send::scs0 tag/::term::ansi::send::scs1 tagβ Select Character Set. π
Choose which character set is used for default (scs0) and alternate font (scs1). This does not change whether default or alternate font are used, just their definitions.
The legal tags, and their meanings, are:
Aβ United Kingdom SetBβ ASCII Set0β Special Graphics1β Alternate Character ROM Standard Character Set2β Alternate Character ROM Special Graphics
::term::ansi::send::sda arg...β Set Display Attributes. The arguments are the code sequences for the possible attributes, as provided by the packageterm::ansi::code::attr. For convenience this package also provides additional commands, each setting a single specific attribute. π::term::ansi::send::sda_fgblackβ Set text color to Black.::term::ansi::send::sda_fgredβ Set text color to Red.::term::ansi::send::sda_fggreenβ Set text color to Green.::term::ansi::send::sda_fgyellowβ Set text color to Yellow.::term::ansi::send::sda_fgblueβ Set text color to Blue.::term::ansi::send::sda_fgmagentaβ Set text color to Magenta.::term::ansi::send::sda_fgcyanβ Set text color to Cyan.::term::ansi::send::sda_fgwhiteβ Set text color to White.::term::ansi::send::sda_fgdefaultβ Set default text color (Black).::term::ansi::send::sda_bgblackβ Set background to Black.::term::ansi::send::sda_bgredβ Set background to Red.::term::ansi::send::sda_bggreenβ Set background to Green.::term::ansi::send::sda_bgyellowβ Set background to Yellow.::term::ansi::send::sda_bgblueβ Set background to Blue.::term::ansi::send::sda_bgmagentaβ Set background to Magenta.::term::ansi::send::sda_bgcyanβ Set background to Cyan.::term::ansi::send::sda_bgwhiteβ Set background to White.::term::ansi::send::sda_bgdefaultβ Set default background (Transparent).::term::ansi::send::sda_boldβ Bold on.::term::ansi::send::sda_dimβ Dim on.::term::ansi::send::sda_italicβ Italics on.::term::ansi::send::sda_underlineβ Underscore on.::term::ansi::send::sda_blinkβ Blink on.::term::ansi::send::sda_reversβ Reverse on.::term::ansi::send::sda_hiddenβ Hidden on.::term::ansi::send::sda_strikeβ Strike-through on.::term::ansi::send::sda_noboldβ Bold off.::term::ansi::send::sda_noitalicβ Italics off.::term::ansi::send::sda_nounderlineβ Underscore off.::term::ansi::send::sda_noblinkβ Blink off.::term::ansi::send::sda_noreversβ Reverse off.::term::ansi::send::sda_nohiddenβ Hidden off.::term::ansi::send::sda_nostrikeβ Strike-through off.::term::ansi::send::sda_resetβ Reset all attributes to their default values.::term::ansi::send::fcp row colβ Force Cursor Position (aka Go To).::term::ansi::send::cu ?n?β Cursor Up. n defaults to1.::term::ansi::send::cd ?n?β Cursor Down. n defaults to1.::term::ansi::send::cf ?n?β Cursor Forward. n defaults to1.::term::ansi::send::cb ?n?β Cursor Backward. n defaults to1.::term::ansi::send::ss ?s e?β Scroll Screen (entire display, or between rows start end, inclusive).::term::ansi::send::skd code strβ Set Key Definition.::term::ansi::send::title strβ Set the terminal title.::term::ansi::send::gronβ Switch to character/box graphics. I.e. switch to the alternate font.::term::ansi::send::groffβ Switch to regular characters. I.e. switch to the default font.::term::ansi::send::tlcβ Character graphics, Top Left Corner.::term::ansi::send::trcβ Character graphics, Top Right Corner.::term::ansi::send::brcβ Character graphics, Bottom Right Corner.::term::ansi::send::blcβ Character graphics, Bottom Left Corner.::term::ansi::send::ltjβ Character graphics, Left T Junction.::term::ansi::send::ttjβ Character graphics, Top T Junction.::term::ansi::send::rtjβ Character graphics, Right T Junction.::term::ansi::send::btjβ Character graphics, Bottom T Junction.::term::ansi::send::fwjβ Character graphics, Four-Way Junction.::term::ansi::send::hlβ Character graphics, Horizontal Line.::term::ansi::send::vlβ Character graphics, Vertical Line.::term::ansi::send::groptim strβ Optimize character graphics. The generator commands above create way too many superfluous commands shifting into and out of the graphics mode. This command removes all shifts which are not needed. To this end it also knows which characters will look the same in both modes, to handle strings created outside of this package. π::term::ansi::send::clearβ Clear screen. In essence a sequence of CursorHome + EraseDown.::term::ansi::send::initβ Initialize default and alternate fonts to ASCII and box graphics.::term::ansi::send::showat row col textβ Show the block of text at the specified location.
π BUGS, IDEAS, FEEDBACK π
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. Please also report any ideas for enhancements you may have for either package and/or documentation. π«Ά
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 π
- character output
- control
- terminal
π¦ CATEGORY π¦
Terminal control
Β©οΈ COPYRIGHT Β©οΈ
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay bestie, that's the whole page. This is tcllib 0.2, page term::ansi::send(3tcl). The footer didn't have a date, so no date energy today. Stay iconic. π β¨
π¦ 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