Hi chaw,
> This issue is really minor but I'll mention it anyway
Please do, there's quite a few things like this.
> Is there a reason why sortm exits with a nonzero status when asked to
> sort a folder with no messages?
I think it's a result of the non-empty sets which MH calls sequences.
sortm wants one of these to sort. Defining it by what doesn't exist is
an error. There is an implicit ‘all’ sequence if nothing is specified.
$ ls -la
total 52
drwxrwxr-x 2 ralph ralph 4096 Jan 14 12:32 .
drwxrwxrwt 1052 root root 49152 Jan 14 12:32 ..
$
$ sortm +. all
sortm: no messages in /home/tmp/1768393968.845320419
$ echo $?
1
$ sortm +. first
sortm: no messages in /home/tmp/1768393968.845320419
$ echo $?
1
$ sortm +. 1
sortm: no messages in /home/tmp/1768393968.845320419
$ echo $?
1
$
> To me it seems more natural for that case to be handled as a boundary
> but nonerror case and exit with a normal (zero) status.
That would be nice. Presumably, it would have to be chosen by an option
to avoid breaking existing expectations. ‘-empty’ with -noempty the
default?
--
Cheers, Ralph.