38 Commits

Author SHA1 Message Date
9a2d481fc3 mu: add --listen option for server
Add a --listen option for the server

Rework the option code to share the --listen / socket-path code between scm and
server subcommands.

Move option off the stack in mu.cc, seems it's too big, at least when using gdb.
2025-08-24 11:54:08 +03:00
e56c848952 scm: support --listen flag for uds
Support the --listen flag to mu scm, to start listening on a Unix domain socket.
2025-08-17 12:02:29 +03:00
46fa4f2aa2 mu: add 'label' command + manpage + tests
Add a label command and document it.
2025-08-15 21:03:19 +03:00
4c2ce92a15 cli11: prefer system package if found
mu embeds a "vendored" version of libcl11 under thirdparty/; but it's
better to use the system-package if the user has one.

So, use the system package if found or user -Duse-embedded-cli11=true is
specified.
2025-07-24 19:55:27 +03:00
812d78be49 mu-scm: add options, some tweaks
Add the (options) procedure + docs.

Some internal tweaks / clean-ups.
2025-06-30 21:57:29 +03:00
f9c24c7166 mu: add 'scm' command
Add the "scm" command, the way to get a Guile/Scheme shell.

This is experimental but will replace the current guile support in guile/ at
some point.
2025-06-16 10:57:36 +03:00
f75e1203d4 mu: rename --my-address into --personal-address
This makes things a bit more uniform with all the places where we use
"personal".

--my-address remains as an alias for the command-line option.

Add unit test.

Resolves #2806.
2025-05-24 17:17:00 +03:00
44ba631a34 mu-find: implement format=json2
Implement a new experimental json2 format for mu-find, which gets rid of
the ":" prefixes for fields, i.e., "subject" instead of ":subject".
Document it as well.
2025-03-23 19:47:09 +02:00
d8d5e4cca5 options: do not canonicalize maildir-path
This doesn't play well with shells that don't expand options (such as
bash) in combination with "ExpandPath".

Fixes #2793.
2024-12-09 18:27:15 +02:00
2d7288effa Canonicalize init --maildir argument after expanding
Ensure that `maildir` is an absolute and _canonical_ path when user passes
a custom maildir path using `mu init --maildir PATH`
2024-08-06 16:01:39 +02:00
f813498f4d mu: add --reindex option for mu index
I.e. without having to reinit explicitly.
2024-04-05 19:03:42 +03:00
b4c768e6d0 mu-init: guess maildir when --maildir is missing
Re-instate the guessing that's in the manpage. Add unit tests.
Update documentation.

Fixes #2616.
2024-01-01 10:33:03 +02:00
2d20074b99 mu-move: add new move sub command
Add sub-command to move messages; add tests and docs.

Fixes #157
2023-09-24 17:29:08 +03:00
264bb092f0 support xapian ngrams
Xapian supports an "ngrams" option to help with languages/scripts
without explicit wordbreaks, such as Chinese / Japanese / Korean.

Add some plumbing for supporting this in mu as well. Experimental for
now.
2023-09-09 17:26:20 +03:00
f6122ecc9e mu-find: add --analyze option
For analyzing queries with the new query-parser.
2023-09-09 11:59:59 +03:00
924bb2145e mu-server: implement temp-file optimization
It can be faster to feed big mu -> mu4e data, such as contacts are
message headers through a temp-file instead directly though stdout;
implement this, and add the server parameter --allow-temp-file.

Implement this the "contacts" and "find" commands.
2023-08-04 00:09:02 +03:00
a71b4f5e8d options: expand option file paths
Fixes #2528
2023-08-03 22:47:27 +03:00
ade62fc67c options: implement ExpandPath transformer
For expanding shell options (with expand_path / wordexp)

Note that e.g. in zsh: --maildir=~/Maildir is handled (program receives
--maildir=/home/user/Maildir) but e.g. bash does not do that, and the
program receives the literal '~/Maildir'

We expanded this in mu earlier, so let's do that again.
2023-08-03 22:47:27 +03:00
dcf2298680 mu: use fmt-based apis in mu index/server and options
iostream is so 1998.
2023-07-25 21:11:56 +03:00
3337c9babb mu-view: add --format=html
Support showing the HTML body (if any) instead of the default plain-text
body.

Update manpage.
2023-07-23 21:04:26 +03:00
82235b9d49 fmt: more update to use new fmt-based APIs 2023-07-06 21:49:50 +03:00
4920b56671 update to use fmt-based apis
Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
2023-07-05 23:10:13 +03:00
9004363aa5 cli: merge 'fields' with 'info' command
Update the 'info' command to handle 'fields' as well; remove
fields.
2023-07-05 20:39:47 +03:00
c4b5795328 cli: support --ignored-address for init command
Allow for skipping unwanted addresses (such as 'noreply') from the
contacts cache.
2023-07-02 10:00:40 +03:00
9544473e35 mu extract/view/verify: allow reading message from stdin
Fixes #1463.
2023-04-30 10:35:28 +03:00
0ab2371c5c mu-cfind: re-enable --after option
It was still there, but disabled.

Fixes #2470.
2023-04-08 20:48:46 +03:00
ff1e06c7c8 mu-find: restore JSON output
Fixes #2453
2023-03-30 18:12:33 +03:00
ff08731298 mu: add --uncooked option for mu extract
To avoid replacing spaces with dashes

Fixes #2434.
2023-02-23 20:23:25 +02:00
e21d59e346 mu init: implement --reinit option
Create new mu database from an existing one.
2023-01-29 13:40:40 +02:00
4194f17440 mu: allow color in early command errors 2023-01-18 00:14:02 +02:00
49fb937d61 fix batch-size option in sub_init
I use mu on a resource constrained VPS, so I need to reduce batch-size from the default value, thus I found this bug.
2023-01-15 12:54:04 -05:00
5300b7ce82 cfind: rework, add support for json output
Update the old cfind code, and add json output support while doing so.
2022-12-30 15:14:17 +02:00
9eaad5ad9c mu-find: support shortcut chars in --sortfield
Fixes #2384.
2022-12-18 01:09:58 +02:00
39a2c28777 mu: honor nocolor option
1. mu find hallo              --> color
2. mu find hallo | less       --> nocolor
3. NO_COLOR=yes mu find hallo --> nocolor

Fixes #2369.
2022-11-24 18:43:05 +02:00
71162ee74f mu-find: bring back --reverse
It was missing after the cmdline parsing landed.

Fixes issue #2368.
2022-11-23 22:35:57 +02:00
4d1352ec56 mu/options: Support date sortfield
Fixes #2368.
2022-11-22 23:16:37 +02:00
f4ac16db5a mu/options: Add missing include unordered_map
This broke the MacOS build
2022-11-19 11:10:12 +02:00
36f6e387ae mu: implement new command-line parser
Implement a new command-line parser, based on CLI11.

It's a bit more C++'ish, and allows for a lot of fancy things... some of
which we have implemented here.

Update the various commands to use the new Options struct

Remove the old help strings; instead e.g. `mu help view` opens the
manpage.

Integrate the guile scripts more tightly.
2022-11-17 11:00:06 +02:00