twk_term 0.3.0
twk_term: ^0.3.0 copied to clipboard
An embedded terminal for twk: a permissive VT emulator drawn by the core's Canvas, a pseudo-terminal through dart:ffi, and TerminalView, a widget that runs a program in one.
Changelog #
0.3.0 #
Fixed:
- The emulator makes one screen wherever the program's writes are cut: a cluster continued in a later write acts as in one write, and a control ends it.
- A
TerminalSessiondisposed before its program started completesexitCodewith null. - A color spec with a sign or whitespace in a channel is no color for OSC 4, 10, 11 and 12.
0.2.0 #
- On macOS
Pty.startfails when the SIGCONT that lets its suspended program run is refused, killing and waiting for the program, where the program stayed stopped and thePtynever ended; and the kqueue that watches the program is closed when setting it up fails. - A program
Pty.startspawned and killed when setting it up failed after the spawn is waited for, so no zombie of it is left until the process ends. Ptyleaves the CI variables (CI,CONTINUOUS_INTEGRATION,BUILD_NUMBER,RUN_ID) out of its program's environment, as it does the host terminal's: a twk app in it draws in the emulator, not as for a CI log.Pty.exitCodeknows the code on macOS too when the VM waited for the program first, andPty.tellsExitCodesays where it does.Pty.debugUnreadOutput: the bytes of the program's output the master holds unread (FIONREAD), for a test's report of a wait that failed.Pty.exitCodeknows the code of a program that ends at once on macOS too: the program is spawned suspended (POSIX_SPAWN_START_SUSPENDED) and let run once its kqueue watch is set, which a VM reaping it could beat before. On LinuxPty.tellsExitCodeis true only where the pidfd is made with the program (pidfd_spawn, glibc 2.39), not opened after it.
Breaking:
- A cell's style id is a
StyleId(package:twk_core):TerminalEmulator.styleAtanswers one, andTerminalLine's constructor,clear,eraseandresizetake one,StyleId.basefor the default style where 0 was.TerminalLine.stylesstays aUint32List.
0.1.0 #
The first release.
TerminalEmulator: a permissive VT emulator (xterm's sequences, the alternate screen, scroll margins, a scrollback, wide characters, SGR in 16, 256 and 24-bit colors, OSC 8 links, the mouse's and the keyboard's encodings), its screen drawn by the core'sCanvas, resized keeping what it shows. Its styles and glyphs, in tables of its own, are swept as a screen's are (sweepFloor), and its styles painted as they are, with no pen each, so a program of ever more 24-bit colors or new clusters (a video, an image viewer) keeps those on its screens and scrollback, not every one it sent.Pty: a pseudo-terminal through dart:ffi on Linux and macOS, a program run in it with its size, environment and working directory.TerminalView: a widget that runs a program in a terminal of its own, keys and the mouse passed to it, its title, its bell and its selection.- The emulator and
TerminalViewon the web too (platformslists it), over a link of the app's own:Ptythere throwsUnsupportedError.