summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-18 22:29:44 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-18 22:29:44 -0400
commitf3081669e488c54ab4fcae2829ea2f58f082c6e7 (patch)
treed3c83c861f4733e7930e4d7733b059b38404c588 /src/commands
parent12f28d72fa9814bcd9fb2fd5bc4c54fabe93c031 (diff)
add default keymappings when config dne
- message colors are now yellow instead of cyan - there is now a wrapper around keymap hashmap
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/bulk_rename.rs1
-rw-r--r--src/commands/mod.rs8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/bulk_rename.rs b/src/commands/bulk_rename.rs
index f1f9549..2fff733 100644
--- a/src/commands/bulk_rename.rs
+++ b/src/commands/bulk_rename.rs
@@ -88,6 +88,7 @@ impl BulkRename {
let path = path::PathBuf::from(line);
paths_renamed.push(path);
}
+ std::fs::remove_file(&file_path)?;
}
if paths_renamed.len() < paths.len() {
return Err(JoshutoError::new(
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index cca9b20..d511a52 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -95,12 +95,12 @@ pub fn from_args(command: String, args: Vec<String>) -> JoshutoResult<Box<dyn Jo
"copy_files" => Ok(Box::new(self::CopyFiles::new())),
"console" => match args.len() {
0 => Ok(Box::new(self::CommandLine::new(
- String::new(),
- String::new(),
+ "".to_string(),
+ "".to_string(),
))),
1 => Ok(Box::new(self::CommandLine::new(
- String::from(args[0].as_str()),
- String::new(),
+ args[0].clone(),
+ "".to_string(),
))),
i => Err(JoshutoError::new(
JoshutoErrorKind::IOInvalidData,