Crates.io | plume |
lib.rs | plume |
version | 0.1.1 |
source | src |
created_at | 2018-04-14 09:08:06.571281 |
updated_at | 2018-04-14 11:37:05.800052 |
description | Spawn a text editor to get text |
homepage | |
repository | https://framagit.org/bochecha/plume |
max_upload_size | |
id | 60530 |
size | 14,988 |
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.
extern crate plume;
use plume::get_text;
let text = get_text()?;
The above will:
find the text editor to use
${EDITOR}
environment variable is set, then its value is used;nano
or vim
;launch that text editor and capture the text entered by the user;
return that text.
Plume is offered under the terms of the GNU Lesser General Public License, either version 3 or any later version.