diff --git a/src/bin/vento.rs b/src/bin/vento.rs index c5db584..d2bc886 100644 --- a/src/bin/vento.rs +++ b/src/bin/vento.rs @@ -43,7 +43,7 @@ fn main() -> Result<()> { "-s" => match args.len() { 4 => inv::list(&args[2], &args[3])?, 3 => inv::list(&args[2], "")?, - 2 => bail!("{}", "You need to specify a slot.".red()), + 2 => bail!("{}", "You need to specify a slot".red()), _ => bail!("{}", "Too many arguments".red()), }, _ => inv::list("active", args[1].as_str())?, diff --git a/src/help.rs b/src/help.rs index b31f6f9..e0052b0 100644 --- a/src/help.rs +++ b/src/help.rs @@ -71,7 +71,7 @@ pub fn drop() -> Result<()> { © 2022 Lux Aliaga. Licensed under GPLv3 {} - - {}: Takes a file off the inventory and drops it. + - {}: Takes a file off the inventory and drops it - {}: Displays this message", "Drop".bold().blue(), "Usage:".bold(), diff --git a/src/inv.rs b/src/inv.rs index 37d769b..c5ff0cf 100644 --- a/src/inv.rs +++ b/src/inv.rs @@ -53,7 +53,7 @@ pub fn list(slot: &str, dir: &str) -> Result<()> { // Detects if Vento hasn't been initialized and bails if so bail!( "{}", - "Vento not initialized. Run \"vento -i\" to initialize Vento.".red() + "Vento not initialized. Run \"vento -i\" to initialize Vento".red() ); } @@ -70,7 +70,7 @@ pub fn list(slot: &str, dir: &str) -> Result<()> { if dir.to_string().contains("..") { // Basically preventing from listing anything out of bounds. ls and dir exist for that - bail!("{}", "Cannot access parent.".red()); + bail!("{}", "Cannot access parent".red()); } if !slotdir.is_dir() { @@ -78,7 +78,7 @@ pub fn list(slot: &str, dir: &str) -> Result<()> { bail!( "{}", format!( - "No such slot or directory. Valid slots are {} and {}.", + "No such slot or directory. Valid slots are {} and {}", "active".green().bold(), "inactive".blue().bold() ) @@ -91,7 +91,7 @@ pub fn list(slot: &str, dir: &str) -> Result<()> { println!( "🗃️ {}", format!( - "No files in {}{}.", + "No files in {}{}", match slot { "active" => slot.bold(), _ => slot.blue().bold(), diff --git a/src/item.rs b/src/item.rs index 59233c7..e592654 100644 --- a/src/item.rs +++ b/src/item.rs @@ -32,7 +32,7 @@ pub fn take(file: &String, slot: &str, message: bool) -> Result<()> { // Detects if Vento hasn't been initialized and bails if so bail!( "{}", - "Vento not initialized. Run \"vento -i\" to initialize Vento.".red() + "Vento not initialized. Run \"vento -i\" to initialize Vento".red() ); }; let slotdir: PathBuf = match slot { @@ -46,7 +46,7 @@ pub fn take(file: &String, slot: &str, message: bool) -> Result<()> { bail!( "{}", format!( - "No such slot. Valid slots are {} and {}.", + "No such slot. Valid slots are {} and {}", "active".green().bold(), "inactive".blue().bold() ) @@ -78,7 +78,7 @@ pub fn take(file: &String, slot: &str, message: bool) -> Result<()> { let options = CopyOptions::new(); move_dir(&file, &slotdir, &options)?; } else { - bail!("{}", "No such file or directory.".red()); + bail!("{}", "No such file or directory".red()); } common::history(common::HistoryData { @@ -109,7 +109,7 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<( // Detects if Vento hasn't been initialized and bails if so bail!( "{}", - "Vento not initialized. Run \"vento -i\" to initialize Vento.".red() + "Vento not initialized. Run \"vento -i\" to initialize Vento".red() ); }; @@ -124,7 +124,7 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<( bail!( "{}", format!( - "No such slot. Valid slots are {} and {}.", + "No such slot. Valid slots are {} and {}", "active".green().bold(), "inactive".blue().bold() ) @@ -142,7 +142,7 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<( if Path::exists(&destpath) { // Checks if there's a file with the same name in the destination path. - bail!("{}", "A file with the same name already exists in the destination! Try renaming it or dropping this file somewhere else.".red()); + bail!("{}", "A file with the same name already exists in the destination! Try renaming it or dropping this file somewhere else".red()); } if sourcepath.is_file() | sourcepath.is_symlink() { @@ -154,7 +154,7 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<( let options = CopyOptions::new(); move_dir(&sourcepath, &destpath, &options)?; } else { - bail!("{}", "No such file or directory.".red()); + bail!("{}", "No such file or directory".red()); } destpath.pop();