<<< Date Index >>>     <<< Thread Index >>>

Re: regression: attaching files from command line fails



On 28Oct2008 17:07, David Champion <dgc@xxxxxxxxxxxx> wrote:
| > I think the point of the current behavior is to be able to do
| > things like this:
| >     mutt -a *.jpg -- foo@xxxxxxx
| 
| Faced with this need in the past, I've gone with an enclosure notation:
| 
|       mutt -a { *.jpg } foo@xxxxxxxxxxx

Now that's neat! Visually pleasing, anyway. +1

However, given that the option parser is already set up for multiple
arguments, it there a strongly argument for this over, say:

  mutt -g *.jpg -- foo@xxxxxxxxxxx

i.e. don't overload -a with multiple modes, instead provide another
command option (-A is taken, alas). So here I'm stealing the -g of
another suggestion in this thread to say "-g: followed by a set of
filenames as might be produced from a glob, terminated by --".

So, -a: single filename, -g: multiple names but still with the shell
doing the globbing.

I'm -1 on the earlier "-g mutt-internal-globber" for a few reasons: it's
yet anther glob implementation, at variance with the globbing supported
in the user's shell; the variance/glob-dialect will be the subject of
dispute, and itself will need a long documentation; it doesn't handle
other usages, such as this:

  mutt -g `command producing a list of files` -- foo@xxxxxxxxxxx

Globbing is the common case but it's not exhaustive. The current "accept
a bunch of files however generated" handles everything but like some
others I'm a little unhappy with the overloaded behaviour of -a.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

For reading rec.moto, I use one of those carbon-fiber Logitech mice w/a
little 'No Fear' sticker on it. - Mike Hardcore DoD#5010 <moike@xxxxxxxxxx>
                                  Apologies to Primus