diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ba376b..2e897e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added systemd service in `assets/` folder. - Added configuration option `message.delete.style` that can be either `folder` (deleted messages are moved to the Trash folder, default style) or `flag` (deleted messages receive the Deleted flag). +- Added `--debug` as an alias for `RUST_LOG=debug`. +- Added `--trace` as an alias for `RUST_LOG=trace` and `RUST_BACKTRACE=1`. +- Added notes about `--debug` and `--trace` when error occurs. ### Changed - **Added back the search feature**: you can now give an optional filter and sort query at the end of the `envelope list` command. See `envelope list --help` or [pimalaya.org](https://pimalaya.org/himalaya/cli/master/usage/advanced/envelope/list.html#query) for more detail on the search API. - Changed the `envelope list` folder argument due to the search query: it became a flag `--folder|-f`. - Made the global `--config|-c` option repeatable: the first option is considered the path to the main config, and successive options are considered partial overrides [#184]. +- Refactored error management: error should be more clear, colored and can now contain spantrace and backtrace. +- Made `--help` content wrapping properly thanks to the `clap` cargo feature `wrap_help`. - Improved `template {new,reply,forward}` command JSON output: they return now a JSON object with 3 properties: - `content`: the content of the template - `cursor.row`: the row at which the cursor should be placed by the interface using the template diff --git a/Cargo.lock b/Cargo.lock index 6babdc0..a4f0250 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -665,6 +665,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim 0.11.1", + "terminal_size 0.3.0", ] [[package]] @@ -1883,7 +1884,7 @@ dependencies = [ "shellexpand-utils", "sled", "termcolor", - "terminal_size", + "terminal_size 0.1.17", "tokio", "toml", "toml_edit 0.22.9", @@ -4304,6 +4305,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.32", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.58" diff --git a/Cargo.toml b/Cargo.toml index b6d078c..03757f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ pgp-native = ["email-lib/pgp-native", "mml-lib/pgp-native", "pgp"] [dependencies] ariadne = "0.2" async-trait = "0.1" -clap = { version = "4.4", features = ["derive"] } +clap = { version = "4.4", features = ["derive", "wrap_help"] } clap_complete = "4.4" clap_mangen = "0.2" color-eyre = "0.6.3"