split into workspace so CLI can be a standalone crate
This commit is contained in:
1 parent
27c2f467c4
commit
55801384eb
12 files changed
+259
-148
No files matched your search
@@ -5,21 +5,20 @@
|
||||
|
||||
use creddy::{
|
||||
app,
|
||||
cli,
|
||||
errors::ShowError,
|
||||
};
|
||||
|
||||
|
||||
fn main() {
|
||||
let global_matches = cli::parser().get_matches();
|
||||
let global_matches = creddy_cli::parser().get_matches();
|
||||
let res = match global_matches.subcommand() {
|
||||
None | Some(("run", _)) => {
|
||||
app::run().error_popup("Creddy encountered an error");
|
||||
Ok(())
|
||||
},
|
||||
Some(("get", m)) => cli::get(m, &global_matches),
|
||||
Some(("exec", m)) => cli::exec(m, &global_matches),
|
||||
Some(("shortcut", m)) => cli::invoke_shortcut(m, &global_matches),
|
||||
Some(("get", m)) => creddy_cli::get(m, &global_matches),
|
||||
Some(("exec", m)) => creddy_cli::exec(m, &global_matches),
|
||||
Some(("shortcut", m)) => creddy_cli::invoke_shortcut(m, &global_matches),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user