mirror of
https://git.sr.ht/~nixgoat/vento
synced 2024-11-16 12:02:49 +00:00
src: Remove periods from end of sentences
For many messages there were some consistency issues in terms of punctuation. I've fixed this issue by removing every period from every sentence.
This commit is contained in:
parent
af0a27464b
commit
6ad43bbf82
|
@ -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())?,
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
14
src/item.rs
14
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();
|
||||
|
|
Loading…
Reference in a new issue