mirror of
https://github.com/chmln/handlr.git
synced 2024-11-23 09:41:45 +01:00
Launch - use UserPath
This commit is contained in:
parent
b5468c1ec7
commit
44efa593f8
2 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ pub enum Cmd {
|
|||
/// Launch the handler for specified extension/mime with optional arguments
|
||||
Launch {
|
||||
mime: MimeOrExtension,
|
||||
args: Vec<String>,
|
||||
args: Vec<UserPath>,
|
||||
},
|
||||
|
||||
/// Get handler for this mime/extension
|
||||
|
|
|
@ -12,8 +12,8 @@ mod utils;
|
|||
fn main() -> Result<()> {
|
||||
use clap::Clap;
|
||||
use cli::Cmd;
|
||||
use common::{Handler};
|
||||
use std::{collections::HashMap};
|
||||
use common::Handler;
|
||||
use std::collections::HashMap;
|
||||
|
||||
// create config if it doesn't exist
|
||||
Lazy::force(&CONFIG);
|
||||
|
@ -31,7 +31,7 @@ fn main() -> Result<()> {
|
|||
apps.save()?;
|
||||
}
|
||||
Cmd::Launch { mime, args } => {
|
||||
apps.get_handler(&mime.0)?.launch(args)?;
|
||||
apps.get_handler(&mime.0)?.launch(args.into_iter().map(|a| a.to_string()).collect())?;
|
||||
}
|
||||
Cmd::Get { mime, json } => {
|
||||
apps.show_handler(&mime.0, json)?;
|
||||
|
|
Loading…
Reference in a new issue