From 91befad113bd865ffee0d6c07d94b93430f1bc6e Mon Sep 17 00:00:00 2001 From: Volodymyr Patuta <6977238-fiplox@users.noreply.gitlab.com> Date: Fri, 27 Nov 2020 21:20:19 +0100 Subject: [PATCH] patch category --- src/rnote/app.rs | 9 ++++++--- src/rnote/process.rs | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rnote/app.rs b/src/rnote/app.rs index ac1169a..d552227 100644 --- a/src/rnote/app.rs +++ b/src/rnote/app.rs @@ -13,10 +13,13 @@ pub fn make_app() -> App<'static, 'static> { .arg( Arg::with_name("category") .help("Create note in category.") - .short("c") - .long("category"), + .index(2), ) - .arg(Arg::with_name("header").help("Give name to the file.")), + .arg( + Arg::with_name("header") + .index(1) + .help("Give name to the file."), + ), ) .subcommand( SubCommand::with_name("remove") diff --git a/src/rnote/process.rs b/src/rnote/process.rs index 1a410b5..76770b5 100644 --- a/src/rnote/process.rs +++ b/src/rnote/process.rs @@ -1,14 +1,13 @@ use crate::rnote::notes; use anyhow::Result; use clap::ArgMatches; -use notes::modify; use text_io::read; pub fn new(matches: &ArgMatches) -> Result<()> { let header = match matches.value_of("header") { Some(s) => s.to_owned(), None => { - print!("Enter the name of your note: "); + println!("Enter the name of your note: "); read!() } };