release v0.5.2 (#282)

* doc: fix blur in list msg screenshots (#181)

* fix a typo in mbox arg (#245)

`targetted` to `targeted` 👌🏻

* make inbox, sent and drafts folder customizable (#246)

* mbox: make inbox, sent and drafts folder customizable

* msg: update send handler parameters order

* vim: fix extracting message ids from list (#247)

The current method doesn't work because the list uses a fancy line
character (`│`) as the separator, not a regular pipe character (`|`).
Matching for the first number in the line instead solves the problem and
will continue to work regardless of what separator is used.

* add new line after printing strings (#251)

* init cargo workspace (#252)

* init cargo workspaces

* nix: fix assets path

* doc: update rtp vim plugin

* vim: add error message if loading vim plugin from vim/

* init sub crates (#253)

* init sub crates

* doc: update readme

* doc: improve main readme

* doc: add links, add missing crate task

* doc: update emojis

* update cargo lock

* implement contact completion with completefunc (#250)

This allows users to define a command for contact completion with
`g:himalaya_complete_contact_cmd` and trigger it with `<C-x><C-u>` when
writing an email.

* fix clippy lints (#255)

* revert cargo workspace feature

* fix nix run (#274)

* replace cargo2nix by naersk

* add rust-analyzer and rustfmt to nix build inputs

* remove wiki from git submodules, update changelog

* fix missing range when fetch fails, add more logs (#276)

* add missing fix in changelog

* remove blank lines and spaces from plain parts (#280)

* fix watch command (#271)

* remove also tabs from text parts (#280)

* pin native-tls minor version (#278)

* improve msg sanitization (#280)

* fix mbox vim plugin telescope preview (#249)

* bump version v0.5.2

* update changelog

Co-authored-by: Austin Traver <austintraver@gmail.com>
Co-authored-by: Jason Cox <dev@jasoncarloscox.com>
Co-authored-by: Gökmen Görgen <gkmngrgn@gmail.com>
Co-authored-by: Ethiraric <ethiraric@gmail.com>
This commit is contained in:
Clément DOUIN
2022-02-02 02:21:35 +01:00
committed by GitHub
parent f9775ae8af
commit 8cdeba62a1
34 changed files with 494 additions and 487 deletions
+5 -6
View File
@@ -1,6 +1,4 @@
use anyhow::Result;
use clap;
use env_logger;
use output::StdoutPrinter;
use std::{convert::TryFrom, env};
use url::Url;
@@ -36,6 +34,7 @@ fn create_app<'a>() -> clap::App<'a, 'a> {
.subcommands(msg_arg::subcmds())
}
#[allow(clippy::single_match)]
fn main() -> Result<()> {
// Init env logger
env_logger::init_from_env(
@@ -45,9 +44,9 @@ fn main() -> Result<()> {
// Check mailto command BEFORE app initialization.
let raw_args: Vec<String> = env::args().collect();
if raw_args.len() > 1 && raw_args[1].starts_with("mailto:") {
let mbox = Mbox::new("INBOX");
let config = Config::try_from(None)?;
let account = Account::try_from((&config, None))?;
let mbox = Mbox::new(&account.inbox_folder);
let mut printer = StdoutPrinter::from(OutputFmt::Plain);
let url = Url::parse(&raw_args[1])?;
let mut imap = ImapService::from((&account, &mbox));
@@ -68,9 +67,9 @@ fn main() -> Result<()> {
}
// Init entities and services.
let mbox = Mbox::new(m.value_of("mbox-source").unwrap());
let config = Config::try_from(m.value_of("config"))?;
let account = Account::try_from((&config, m.value_of("account")))?;
let mbox = Mbox::new(m.value_of("mbox-source").unwrap_or(&account.inbox_folder));
let mut printer = StdoutPrinter::try_from(m.value_of("output"))?;
let mut imap = ImapService::from((&account, &mbox));
let mut smtp = SmtpService::from(&account);
@@ -81,7 +80,7 @@ fn main() -> Result<()> {
return imap_handler::notify(keepalive, &config, &mut imap);
}
Some(imap_arg::Command::Watch(keepalive)) => {
return imap_handler::watch(keepalive, &mut imap);
return imap_handler::watch(keepalive, &account, &mut imap);
}
_ => (),
}
@@ -150,7 +149,7 @@ fn main() -> Result<()> {
);
}
Some(msg_arg::Command::Send(raw_msg)) => {
return msg_handler::send(raw_msg, &mut printer, &mut imap, &mut smtp);
return msg_handler::send(raw_msg, &account, &mut printer, &mut imap, &mut smtp);
}
Some(msg_arg::Command::Write(atts)) => {
return msg_handler::write(atts, &account, &mut printer, &mut imap, &mut smtp);