readchar 0.1.1

a simple to use calculator
Documentation
  • Coverage
  • 14.29%
    1 out of 7 items documented0 out of 0 items with examples
  • Size
  • Source code size: 36.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • bgkillas/ucalc
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bgkillas

readchar

docs.rs

a concurrently outputting readline implementation

Example

see ./examples/generic.rs for example usage

cargo run --example generic.rs -- executable args

executes executable with args, and then the input line from readchar is the final argument, so

cargo run --example generic.rs -- calc

will run calc on each input line while you type

Features

  • local/file history
  • outputting while you type

Actions

Keystroke Action
Left Move cursor one character left
Right Move cursor one character right
Ctrl-Up Move cursor up one line
Ctrl-Down Move cursor down one line
Up Move up history by 1 entry
Down Move down history by 1 entry
Backspace Removes the character left of the cursor, the moves left one character
Delete Removes the character on the cursor
Enter goes to next line and resets input

Special keywords

runs these on enter

I might remove these or make these optional

  • clear clears the terminal
  • exit exits the program