[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: merge pick and scan
From: |
Ralph Corderoy |
Subject: |
Re: merge pick and scan |
Date: |
Wed, 30 Mar 2022 08:11:51 +0100 |
Hi Philipp,
> To scan selected messages currently a combination of scan and pick is
> used. It would be nice to be able to write something like:
>
> scan -from bob
>
> In order to do this we could add the -form/-format switches to pick
> and make scan a link to pick. To avoid most breakage pick would use
> "%(msg)" format by default and scan.default if called as scan. This
> way only some scan aliases would break (if -form/-format is not
> explicitly set for them). All other usages would still work.
Did you know pick(1) says
HISTORY
In previous versions of MH, the pick command would show, scan,
or refile the selected messages. This was rather “inverted
logic” from the Unix point of view, so pick was changed to
define sequences and output those sequences. Hence, pick can be
used to generate the arguments for all other MH commands,
instead of giving pick endless switches for invoking those
commands itself.
I'm generally not in favour because it seems to be combining two
specific things rather than thinking more orthoganally.
For example, I'd quite like to do
refile +archive -from foo -and -subject bar
forw -mime -date '01 Apr'
IOW, make pick's expressions first-class citizens of all nmh command
parsing. Except I think the syntax is wordy and something like
refile +archive from:foo subject:bar
would be better, including the implicit logical conjunction.
--
Cheers, Ralph.
Re: merge pick and scan,
Ralph Corderoy <=