mirror of
https://github.com/denisidoro/navi.git
synced 2026-07-25 19:13:58 +00:00
Add support for Alfred (#347)
This commit is contained in:
parent
019adf82cf
commit
c7f919eaa0
19 changed files with 850 additions and 54 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use crate::flows;
|
||||
use crate::flows::core::Variant;
|
||||
use crate::structures::option::Command::{Best, Fn, Preview, Query, Repo, Search, Widget};
|
||||
use crate::structures::option::{Config, RepoCommand};
|
||||
use crate::structures::option::Command::{Alfred, Best, Fn, Preview, Query, Repo, Search, Widget};
|
||||
use crate::structures::option::{AlfredCommand, Config, RepoCommand};
|
||||
use anyhow::Context;
|
||||
use anyhow::Error;
|
||||
|
||||
|
|
@ -39,6 +39,12 @@ pub fn handle_config(config: Config) -> Result<(), Error> {
|
|||
RepoCommand::Browse => flows::repo::browse(&config.finder)
|
||||
.context("Failed to browse featured cheatsheets"),
|
||||
},
|
||||
|
||||
Alfred { cmd } => match cmd {
|
||||
AlfredCommand::Start => flows::alfred::main(config),
|
||||
AlfredCommand::Suggestions => flows::alfred::suggestions(config),
|
||||
AlfredCommand::Transform => flows::alfred::transform(config),
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue