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

Re: regression: attaching files from command line fails



* Tue Oct 28 2008 TAKAHASHI Tamotsu <ttakah@xxxxxxxxxxxxxxxxx>
> What about post-detect, instead of pre-detect?

Oh, but my patch didn't allow
"mutt -a first.dat -a second.dat recip@xxxxxxxxxxx"
(the second file was treated as an address).

If you need to allow multiple occurence of "-a",
post-detection is too difficult for me.

Here is another patch, to adjust
documentation instead of implementation.

-- 
tamo

diff -r 5ea9f336dd60 UPDATING
--- a/UPDATING  Mon Oct 20 11:50:38 2008 -0700
+++ b/UPDATING  Tue Oct 28 16:44:49 2008 +0900
@@ -12,6 +12,7 @@
     to an IMAP server before it must collect the responses
   + $ssl_client_cert available with gnutls as well as openssl
   + 'mime_lookup application/octet-stream' added to system Muttrc
+  ! option '-a' requires '--' even for one single file
 
 1.5.18 (2008-05-17):
 
diff -r 5ea9f336dd60 doc/mutt.man
--- a/doc/mutt.man      Mon Oct 20 11:50:38 2008 -0700
+++ b/doc/mutt.man      Tue Oct 28 16:44:49 2008 +0900
@@ -35,8 +35,7 @@
 [-s \fIsubj\fP]
 [-b \fIaddr\fP]
 [-c \fIaddr\fP]
-[\-a \fIfile\fP [...]]
-[\-\-]
+[\-a \fIfile\fP [...] \-\-]
 \fIaddr\fP [...]
 .PP
 .B mutt 
@@ -74,10 +73,10 @@
 .PP
 .IP "-A \fIalias\fP"
 An expanded version of the given alias is passed to stdout.
-.IP "-a \fIfile\fP [...]"
+.IP "-a \fIfile\fP [...] --"
 Attach a file to your message using MIME.
-To attach multiple files, separating filenames and recipient addresses with
-"\-\-" is mandatory, e.g. \fBmutt \-a img.jpg *.png \-\- addr1 addr2\fP.
+You have to separate filenames and recipient addresses with
+"\-\-", e.g. \fBmutt \-a img.jpg *.png \-\- addr1 addr2\fP.
 .IP "-b \fIaddress\fP"
 Specify a blind-carbon-copy (BCC) recipient
 .IP "-c \fIaddress\fP"
diff -r 5ea9f336dd60 main.c
--- a/main.c    Mon Oct 20 11:50:38 2008 -0700
+++ b/main.c    Tue Oct 28 16:44:49 2008 +0900
@@ -110,8 +110,8 @@
 
   puts _(
 "usage: mutt [<options>] [-z] [-f <file> | -yZ]\n\
-       mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a <file> 
[...]] [--] <addr> [...]\n\
-       mutt [<options>] [-x] [-s <subj>] [-bc <addr>] [-a <file> [...]] [--] 
<addr> [...] < message\n\
+       mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a <file> 
[...] --] <addr> [...]\n\
+       mutt [<options>] [-x] [-s <subj>] [-bc <addr>] [-a <file> [...] --] 
<addr> [...] < message\n\
        mutt [<options>] -p\n\
        mutt [<options>] -A <alias> [...]\n\
        mutt [<options>] -Q <query> [...]\n\
@@ -121,7 +121,7 @@
   puts _("\
 options:\n\
   -A <alias>\texpand the given alias\n\
-  -a <file>\tattach a file to the message\n\
+  -a <files> --\tattach files to the message\n\
   -b <address>\tspecify a blind carbon-copy (BCC) address\n\
   -c <address>\tspecify a carbon-copy (CC) address\n\
   -D\t\tprint the value of all variables to stdout");
@@ -149,7 +149,7 @@
   -Z\t\topen the first folder with new message, exit immediately if none\n\
   -h\t\tthis help message");
   puts _("  --\t\ttreat remaining arguments as addr even if starting with a 
dash\n\
-\t\twhen using -a with multiple filenames using -- is mandatory");
+\t\twhen using -a using -- is mandatory");
 
   exit (0);
 }