Commit Graph

394 Commits

Author SHA1 Message Date
Perma Alesheikh c779081381 use inquire for one set of prompts
Considering that "dialoguer" uses "console" backend library, and the
future of himalaya is reliant on "crossterm", we are moving from
dialoguer, to inquire.

This commit is going to include some experimental changes to one file.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-05-04 11:36:07 +02:00
Clément DOUIN 30f00d0867 fix mailto being parsed after cli 2024-04-20 07:52:22 +02:00
Clément DOUIN 220008d0b4 fix in reply to header skipped from mailto url 2024-04-15 14:29:30 +02:00
Clément DOUIN a9e177b77b bump deps 2024-04-15 12:29:18 +02:00
Perma Alesheikh 5a0ff83a5e replace anyhow and log with color_eyre and tracing
Since Himalaya is intended to be ran as a CLI in the terminal emulator
environment, their user experience could vastly improve with better and
more colorful error messages and logging.

This change will replace more minimal libraries for error-reporting/han-
dling with their more advanced counterparts.

Since these crates have tight integrations, this commit will change both
in one shot.

Also we have don't need env_logger any more. So I also have removed that
guy as well.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-04-15 12:17:56 +02:00
Clément DOUIN cc79f5cc38 fix wrong deps 2024-04-14 16:03:04 +02:00
Clément DOUIN 58df66b5fa update deps 2024-04-07 11:47:09 +02:00
Clément DOUIN d95f277bab adjust code for pimalaya new errors + sync hash 2024-04-05 11:05:55 +02:00
Clément DOUIN ee9718a482 add message.delete.style config option 2024-03-23 17:07:41 +01:00
Clément DOUIN 799ee8b25b use new template cursor api 2024-03-21 13:57:26 +01:00
Clément DOUIN 1c23adc8a2 fix unit tests 2024-03-16 22:31:32 +01:00
Clément DOUIN 7ee710634b bump deps, make global config option repeatable 2024-03-16 22:20:19 +01:00
Clément DOUIN 3868c62511 prevent unknown fields at top config level 2024-03-12 11:57:37 +01:00
Clément DOUIN 362a5ca647 add missing envelope property to 2024-03-10 11:40:37 +01:00
Clément DOUIN c1ffc40bd3 add list envelopes query cli doc 2024-03-10 10:01:01 +01:00
Clément DOUIN a8e6dea162 bump email-lib 2024-03-09 11:06:05 +01:00
Clément DOUIN 46bf3eebfc improve envelope list query error diagnostics 2024-02-29 10:21:01 +01:00
Clément DOUIN 1e7adc5e0c add query arg to envelope list command 2024-02-28 09:09:03 +01:00
Clément DOUIN 1699a581ce update flake and cargo 2024-02-25 09:07:40 +01:00
Clément DOUIN 04982a4644 fix cargo features issues 2024-02-24 14:27:05 +01:00
Clément DOUIN e945c4b8e2 replace sqlite by sled for id mapping storing 2024-02-24 09:37:55 +01:00
Clément DOUIN 0e35a0cd64 add account check-up command 2024-02-24 07:55:37 +01:00
Clément DOUIN 79da9404f3 fix smtp discovery wrong config 2024-02-23 08:46:21 +01:00
Clément DOUIN 5cb247169a fix unit tests 2024-02-23 08:25:15 +01:00
Clément DOUIN 1907817392 fix envelope issues preventing sync to work properly 2024-02-21 22:16:06 +01:00
Clément DOUIN 3e0cf0cfda refactor backend system, remove accouts flattening 2024-02-21 11:38:50 +01:00
Clément DOUIN dd7e1a02be improve pre and post edit choices interaction 2024-02-04 12:13:14 +01:00
Clément DOUIN 35c1453863 added wizard warning about google passwords 2024-02-04 11:36:11 +01:00
Clément DOUIN 83306d5f6a fix pgp unit test 2024-01-28 08:42:18 +01:00
Clément DOUIN 4f9705952a refactor new backend api 2024-01-27 11:15:03 +01:00
Clément DOUIN 16266dbc0b fix message save and send prevented due to clap help 2024-01-22 12:03:33 +01:00
Clément DOUIN 4d288b9d51 fix missing notmuch backend features, improve docs 2024-01-22 10:39:06 +01:00
Clément DOUIN 8cebdf9e90 remove account config from context builder new fn 2024-01-21 22:09:14 +01:00
Clément DOUIN 3137e1e851 add back notmuch features (part 1) 2024-01-21 15:59:03 +01:00
Clément DOUIN 7d4ad9c1d9 replaced autoconfig by custom email-lib account discovery module 2024-01-18 11:59:27 +01:00
Clément DOUIN 2342a83d0d deny unknown fields on toml account config 2024-01-15 22:34:30 +01:00
Clément DOUIN 7eba3a5186 generate one autoconfig per email address 2024-01-15 15:27:14 +01:00
Clément DOUIN 1246be8a5b fix wizard serialization issues 2024-01-12 10:16:43 +01:00
Perma Alesheikh a15e2c0442 allow module inception
Reasons:
- The containing module is already reexported, so repitition in
  namespace is unnecessary.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:13:31 +01:00
Perma Alesheikh fc59757a9d remove another unnecessary conversion
Reasons:
- Avoid unnecessary conversion, since into is called on an String value
  when String is expected, anyway.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:12:57 +01:00
Perma Alesheikh 87eac50eb7 remove comparison with boolean value
Reasons:
- The bool value itself is enough for the filter expression.
- Simplifies the expression.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:12:46 +01:00
Perma Alesheikh 0b066b7529 remove unnessary conversions to itself
Reasons:
- Remove unnecessary steps. into() is called on String when the expected
  type is already String.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:12:31 +01:00
Perma Alesheikh a6440aaa27 remove unnecessary into_owned
Reasons:
- Remove unnecessary step.
- Avoid allocation when not needed.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:12:09 +01:00
Perma Alesheikh 2af1936ef8 use map_while to count for always err case.
Reasons:
- Filter_map will run forever if iterator only returns Err with lines.
  This is a possibility for "lines" iterators.
- Map_while will break the mapping the moment the iterator returns error.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:11:23 +01:00
Perma Alesheikh b417ad11a0 use if let instead of a map with only sideeffects
Reasons:
- Map is usually intended for transforming a value, and as is not
  idiomatically used for only doing side-effects and control flow.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:10:28 +01:00
Perma Alesheikh 0f097fe293 remove double referencing
Reasons:
- The compiler will immediately dereference the referenced reference.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:09:02 +01:00
Perma Alesheikh 945c567f35 remove reference over trait implemented type
Reasons:
- String already implement the AsRef<str>.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:08:41 +01:00
Perma Alesheikh 2ef477c225 remove needless update using default
Reasons:
- Every field is either turned-off entirely or assigned a value when it
  needs one.
- Avoids the situation when a new field is introduced and is assigned a
  default value when it is not desired.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:07:37 +01:00
Perma Alesheikh 54287d40b8 replace into implementation with from
Reasons:
- From Implementation also implements Into trait.
- Adhere to the recommendation by the Into trait's comments.

Signed-off-by: Perma Alesheikh <me@prma.dev>
2024-01-09 22:04:26 +01:00
Clément DOUIN bd1ac45a58 remove empty string from println call 2024-01-09 22:02:09 +01:00