Results 11 comments of Andy Brice

How do you think the interface should work for this? My first proposal is something like the following, based on [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), The [imap-proto Envelope struct](https://github.com/djc/tokio-imap/blob/f6c618d4933c1cd39baf13340328b94b10744df0/imap-proto/src/types.rs#L593-L611), and the [Himalaya Envelope...

My second proposal is something like this… Fields are specified using Himalaya's standard naming scheme and data transformations: ```shell himalaya list --fields id,flags,subject,sender,date ``` And more advanced header fields (with...

> How you would get the sender's name or sender's email with this second version? I think probably just by adding `sender_name` and `sender_address` properties into Himalaya's Envelope struct.\ So...

Yes, it would certainly add a lot more flexibility and expansibility. So I guess it is worth the extra upfront work. And in fact, since the RFC 5322 header names...

And I suppose spaces and parentheses should also be optional for readability? ```shell himalaya list --fields (sender.name, sender.address, "Originator-Return-Address".raw) ```

I was intending `.raw` to mean _"literally just a string with no presentational formatting, nor parsing into higher-level data-structures"_. Though what with [RFC 1342](https://datatracker.ietf.org/doc/html/rfc1342), it might be more sensible to...

As for spaces and parentheses: Yes, I imagine it could get complicated, as a space may be used to terminate the list of values. So I'll leave that.

> How long you think it would take you? Ask me again in a few days! The answer will depend entirely on how I get along with Rust.

I'm afraid I've encountered a (possibly insurmountable) problem with the `" "` quotes syntax… Apparently shells parse quotation marks themselves, before sending the arguments to the CLI. So the CLI...

> it does not work when escaping quotes with backslashes? Technically, it would work. Although then the syntax would become: ```shell himalaya list --fields flags,sender.name,\"X-Spam-Score\",\"Originator-Return-Address\".name,date ``` Which I'd say is...