Plume is a library which can be used in command-line tools to let users write text in their favourite editor.
Think about how Git spawns your ${EDITOR} to let you write a commit message.
Usage
extern crate plume;
use get_text;
let text = get_text?;
The above will:
-
find the text editor to use
- if the
${EDITOR}
environment variable is set, then its value is used; - otherwise, Plume will search for known text editors like
nano
orvim
;
- if the
-
launch that text editor and capture the text entered by the user;
-
return that text.
License
Plume is offered under the terms of the GNU Lesser General Public License, either version 3 or any later version.