diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-07-19 21:33:08 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-07-19 22:18:23 -0400 |
commit | 0b8747eb37d6d943d90e15ed82858d99d1800425 (patch) | |
tree | 6cb910dc37343000296c2951e0f67ff269ee3efd /src/commands/bulk_rename.rs | |
parent | 98e9665e59d7af0b2c002f0e6007578b3e90aa69 (diff) |
changed how commands are handled
- arguments no longer go through wordexp (still working on a good alternative)
other changes:
- changed update_contents to reload_contents
- opening files with mimetype entries are now moved from unix.rs
to mimetypes.rs
Diffstat (limited to 'src/commands/bulk_rename.rs')
-rw-r--r-- | src/commands/bulk_rename.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/commands/bulk_rename.rs b/src/commands/bulk_rename.rs index 1c7ab46..dab20c7 100644 --- a/src/commands/bulk_rename.rs +++ b/src/commands/bulk_rename.rs @@ -4,10 +4,10 @@ use std::process; use rand::Rng; +use crate::commands::{JoshutoCommand, JoshutoRunnable, ReloadDirList}; use crate::context::JoshutoContext; use crate::error::{JoshutoError, JoshutoErrorKind, JoshutoResult}; use crate::window::JoshutoView; -use crate::commands::{JoshutoCommand, JoshutoRunnable, ReloadDirList}; #[derive(Clone, Debug)] pub struct BulkRename; @@ -24,10 +24,12 @@ impl BulkRename { const PREFIX: &str = "joshuto-"; let editor = match std::env::var("EDITOR") { Ok(s) => s, - Err(_) => return Err(JoshutoError::new( - JoshutoErrorKind::EnvVarNotPresent, - String::from("EDITOR environment variable not set"), - )), + Err(_) => { + return Err(JoshutoError::new( + JoshutoErrorKind::EnvVarNotPresent, + String::from("EDITOR environment variable not set"), + )); + } }; /* generate a random file name to write to */ |