mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-05 09:05:13 +00:00
handle completions subcommand first (#116)
* handle completions subcommand first * raise errors from comp_matches Co-authored-by: Clément DOUIN <soywod@users.noreply.github.com> Co-authored-by: Clément DOUIN <soywod@users.noreply.github.com>
This commit is contained in:
parent
6284b0c5a6
commit
b24ff24426
|
@ -67,6 +67,10 @@ fn run() -> Result<()> {
|
|||
debug!("[main] log level: {}", log_level);
|
||||
debug!("[main] custom config path: {:?}", custom_config);
|
||||
|
||||
if comp_matches(build_app(), &matches)? {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
debug!("[main] init config");
|
||||
let config = Config::new(custom_config)?;
|
||||
trace!("[main] {:#?}", config);
|
||||
|
@ -83,7 +87,6 @@ fn run() -> Result<()> {
|
|||
let _matched = mbox_matches(&account, &matches)?
|
||||
|| flag_matches(&account, &mbox, &matches)?
|
||||
|| imap_matches(&config, &account, &mbox, &matches)?
|
||||
|| comp_matches(build_app(), &matches)?
|
||||
|| msg_matches(&config, &account, &mbox, &matches)?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue