Scrawl
Rust library that opens a user's text editor and returns the results as a string. Can be used to open and edit exisiting files, or just as a scratch space for input. Useful for having a user edit text inline with a CLI program a la git commit -m
Built for my new (under development) daily journaling program in Rust: Echo
Functions
For all of these functions the user must have their $EDITOR environmental variable set (or you'll get an error telling you it is not set).
New
Open opens a text buffer in an editor with the contents of the file specified. This does not edit the contents of the file. Returns a Result with the contents of the buffer.
use Path;
Open
Open opens a text buffer in an editor with the contents of the file specified. This does not edit the contents of the file. Returns a Result with the contents of the buffer.
use Path;
Edit
Edit opens a text buffer in an editor with the contents of the file specified. This does edit the contents of the file. Returns a Result with the contents of the buffer.
use Path;