aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/stdio-commands.h
AgeCommit message (Collapse)AuthorFilesLines
2025-07-31implemented ^T command: allows typing by code and getting characters from ↵Robin Haberkorn1-2/+6
stdin or the user * n:^T always prints bytes (cf. :^A) * ^T without arguments returns a codepoint or byte from stdin. In interactive mode, this currentply places a cursor in the message line and waits for a keypress.
2025-07-26implemented the <T> (typeout) command for printing to the terminal from the ↵Robin Haberkorn1-0/+4
current buffer * refactored some code that is common with Xq into teco_get_range_args().
2025-07-26implemented the <^A> command for printing arbitrary stringsRobin Haberkorn1-0/+1
* Greatly improved usability as a scripting language. * The command is in DEC TECO, but in contrast to DEC TECO, we also support string building constructs in ^A. * Required some refactoring: As we want it to write everything verbatim to stdout, the per-interface method is now teco_interface_msg_literal() and it has to deal with unprintable characters. When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel functions/widgets to deal with possible control codes. * Numbers printed with `=` have to be written with a trailing linefeed, which would also be visible as a reverse "LF" in the UI. Not sure whether this is acceptable - the alternative would be to strip the strings before displaying them. * Messages written to stdout are also auto-flushed at the moment. In the future we might want to put flushing under control of the language. Perhaps :^A could inhibit the flushing.
2025-07-22refactored =/==/=== command into stdio-commands.cRobin Haberkorn1-0/+21
There will be a lot more commands for terminal/message input and output soon.