summaryrefslogtreecommitdiffstats
path: root/src/commands/open_file.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-08-05 12:32:41 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-08-05 12:32:41 -0400
commitbcadb3bcdfa93d6d13fd85d655b341e596a33ec2 (patch)
tree6ef844269fb603dc1beed31b6b1256a1710a954a /src/commands/open_file.rs
parent79f99847fe4c3c1086ab6ce943969e01fd15b587 (diff)
decouple mimetypes and file opening more
Diffstat (limited to 'src/commands/open_file.rs')
-rw-r--r--src/commands/open_file.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index bb33c85..5eb8493 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -188,15 +188,9 @@ impl OpenFileWith {
match args_iter.next() {
Some(s) => {
let command = String::from(s);
- let args = args_iter.map(String::from).collect();
- let entry = JoshutoMimetypeEntry {
- command,
- args,
- fork: false,
- silent: false,
- confirm_exit: true,
- };
- entry.execute_with(paths);
+ JoshutoMimetypeEntry::new(command)
+ .add_args(args_iter)
+ .execute_with(paths);
}
None => {}
}