Crates.io | liso |
lib.rs | liso |
version | 1.2.1 |
source | src |
created_at | 2022-11-02 09:23:41.412779 |
updated_at | 2024-05-04 07:36:12.394821 |
description | Line Input with Simultaneous Output: input lines are editable, output lines are never scrambled, and all of it thread safe. |
homepage | |
repository | https://github.com/SolraBizna/liso |
max_upload_size | |
id | 703348 |
size | 213,422 |
Liso (LEE-soh) is an acronym for Line Input with Simultaneous Output. It is a library for writing line-oriented programs: programs that take input in the form of lines, and produce output in the form of lines.
Main features:
tokio
)history
is not disabled)wrapln
function, if the feature flag wrap
is not disabled)completion
is not disabled)Supported platforms:
See the crate documentation for more information, or the examples for complete example programs.
Liso provides line editing based on a commonly-used subset of the default GNU Readline bindings:
Escape
.Quit
.Finish
otherwise.Info
.White_Space
character. ("Delete word")Swap
.Break
.These bindings are subject to change. More bindings may be added in the future, the default bindings may change, and user-specified bindings may one day be possible.
The Atari ST personal computer, released in 1985, came with a VT52 emulator in its onboard ROM. While the ability to serve as a cheap remote terminal was warmly welcomed in the market, the VT52 was a strange choice of terminals to emulate, since, even back in 1985, it was already considered woefully obsolete. Nevertheless, this emulator served as as testbed for support for strange, non-ANSI, non-Crossterm terminals in Liso.
If the TERM
environment variable exists, and the base type (to the left of the -
, if any) is st52
, tw52
, tt52
, at
, atari
, atarist
, atari_st
, vt52
, stv52
, or stv52pc
, then Liso's VT52 support will be activated. It will try to figure out the number of colors and special feature support based on which particular terminal type you've selected and how big it is. You should use one of the following values:
TERM=st52-m
, 80 x 50: Atari ST with monochrome monitor (high res).TERM=st52
, 80 x 25: Atari ST with color monitor (medium res, 4 colors).TERM=st52
, 40 x 25: Atari ST with color monitor (low res, 16 colors).TERM=atari
, any size: Later Atari with color monitor (assumes 16 colors).TERM=vt52
, any size: Real VT52 (untested).Input and output work. Special characters other than control keys don't work, I will need to do more testing to understand why. Testing Liso against Atari's VT52 emulator was extremely helpful in optimizing the redrawing routine, and teasing out some edge cases in the style handling.
I don't have a Windows machine in any real sense, so I can't test whether this crate functions on Windows. It should, since it uses Crossterm, but I would appreciate reports from Windows users and/or developers.
I have no idea how well Liso works for visually-impaired users. If you use command line applications with a screen reader or a Braille terminal, I would greatly appreciate it if you got in touch with me. I would love to learn more about how I can improve your experience with Liso-based programs.
Localized error messages would be very nice to have. I would also love to add RTL / bidirectional support some day.
Liso is copyright 2022 and 2023, Solra Bizna, and licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the Liso crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.