Struct dialoguer::Editor [] [src]

pub struct Editor { /* fields omitted */ }

Launches the default editor edit a string.

Example:

use dialoguer::Editor;

if let Some(rv) = Editor::new().edit("Enter a commit message").unwrap() {
    println!("Your message:");
    println!("{}", rv);
} else {
    println!("Abort!");
}

Methods

impl Editor
[src]

Creates a new editor.

Sets a specific editor executable.

Sets a specific extension

Enables or disables the save requirement.

Enables or disables trailing newline stripping.

This is on by default.

Launches the editor to edit a string.

Returns None if the file was not saved or otherwise the entered text.