summaryrefslogtreecommitdiff
path: root/vendor/dialoguer/examples/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/dialoguer/examples/editor.rs')
-rw-r--r--vendor/dialoguer/examples/editor.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/dialoguer/examples/editor.rs b/vendor/dialoguer/examples/editor.rs
new file mode 100644
index 0000000..5cc21db
--- /dev/null
+++ b/vendor/dialoguer/examples/editor.rs
@@ -0,0 +1,10 @@
+use dialoguer::Editor;
+
+fn main() {
+ if let Some(rv) = Editor::new().edit("Enter a commit message").unwrap() {
+ println!("Your message:");
+ println!("{}", rv);
+ } else {
+ println!("Abort!");
+ }
+}