Changeset 5059:339fd21bf139
- Timestamp:
- 2007-04-03 14:08:46 (22 months ago)
- Author:
- Christoph Berg <cb@…>
- Branch:
- HEAD
- Message:
-
When -- is present in the argument list, allow attachment globs.
The -- separates file names from recipients.
Also works for -A and -Q.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5055
|
r5059
|
|
| | 1 | 2007-04-03 10:54 -0700 Fabian Groffen <grobian@orakel.ods.org> (89abe8bd0713) |
| | 2 | |
| | 3 | * hdrline.c, imap/message.c, mh.c, muttlib.c, regex.c, sendlib.c: Fix |
| | 4 | some warnings. |
| | 5 | |
| | 6 | 2007-04-03 08:59 -0700 Brendan Cully <brendan@kublai.com> (e363d7a69046) |
| | 7 | |
| | 8 | * pop_auth.c, rfc822.c, rfc822.h: Validate msgid in APOP |
| | 9 | authentication. Closes #2846 |
| | 10 | |
| | 11 | * hcache.c: Fix DB4 crash introduced in d5ab883ef90a |
| | 12 | |
| | 13 | * imap/util.c: Add missing hcache.h include |
| | 14 | |
| 1 | 15 | 2007-04-02 20:44 -0700 Brendan Cully <brendan@kublai.com> (59fcc37f8c75) |
| 2 | 16 | |
-
|
r5007
|
r5059
|
|
| 5974 | 5974 | |
| 5975 | 5975 | <para> |
| 5976 | | <literal>mutt</literal> [ -n ] [ -F <emphasis>muttrc</emphasis> ] [ -a <emphasis>file</emphasis> ] [ -c <emphasis>address</emphasis> ] [ -i <emphasis>filename</emphasis> ] [ -s <emphasis>subject</emphasis> ] <emphasis>address</emphasis> [ <emphasis>address</emphasis> ... ] |
| | 5976 | <literal>mutt</literal> [ -n ] [ -F <emphasis>muttrc</emphasis> ] [ -a <emphasis>file</emphasis> ] [ -c <emphasis>address</emphasis> ] [ -i <emphasis>filename</emphasis> ] [ -s <emphasis>subject</emphasis> ] |
| | 5977 | [ [ <emphasis>file</emphasis> ... ] -- ] <emphasis>address</emphasis> [ <emphasis>address</emphasis> ... ] |
| 5977 | 5978 | </para> |
| 5978 | 5979 | |
| … |
… |
|
| 5993 | 5994 | </para> |
| 5994 | 5995 | |
| | 5996 | <para> |
| | 5997 | All files passed with -a <emphasis>file</emphasis> will be attached as a MIME |
| | 5998 | part to the message. To attach several files, use ``--'' to separate files and |
| | 5999 | recipient addresses: <literal>mutt -a *.png -- some@one.org</literal> |
| | 6000 | </para> |
| | 6001 | |
| 5995 | 6002 | </sect1> |
| 5996 | 6003 | |
-
|
r4988
|
r5059
|
|
| 30 | 30 | [-nx] |
| 31 | 31 | [-e \fIcmd\fP] |
| 32 | | [-a \fIfile\fP] |
| 33 | 32 | [-F \fIfile\fP] |
| 34 | 33 | [-H \fIfile\fP] |
| … |
… |
|
| 37 | 36 | [-b \fIaddr\fP] |
| 38 | 37 | [-c \fIaddr\fP] |
| 39 | | [--] |
| | 38 | [\-a \fIfile\fP [...]] |
| | 39 | [\-\-] |
| 40 | 40 | \fIaddr\fP [...] |
| 41 | 41 | .PP |
| … |
… |
|
| 63 | 63 | .IP "-A \fIalias\fP" |
| 64 | 64 | An expanded version of the given alias is passed to stdout. |
| 65 | | .IP "-a \fIfile\fP" |
| | 65 | .IP "-a \fIfile\fP [...]" |
| 66 | 66 | Attach a file to your message using MIME. |
| | 67 | To attach multiple files, separating filenames and recipient addresses with |
| | 68 | "\-\-" is mandatory, e.g. \fBmutt \-a img.jpg *.png \-\- addr1 addr2\fP. |
| 67 | 69 | .IP "-b \fIaddress\fP" |
| 68 | 70 | Specify a blind-carbon-copy (BCC) recipient |
| … |
… |
|
| 118 | 120 | Causes Mutt to open the first mailbox specified by the \fImailboxes\fP |
| 119 | 121 | command which contains new mail. |
| 120 | | .IP "--" |
| | 122 | .IP "\-\-" |
| 121 | 123 | Treat remaining arguments as \fIaddr\fP even if they start with a dash. |
| | 124 | See also "\-a" above. |
| 122 | 125 | .SH ENVIRONMENT |
| 123 | 126 | .PP |
-
|
r5011
|
r5059
|
|
| 106 | 106 | |
| 107 | 107 | puts _( |
| 108 | | "usage: mutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -m <type> ] [ -f <file> ]\n\ |
| 109 | | mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -Q <query> [ -Q <query> ] [...]\n\ |
| 110 | | mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -A <alias> [ -A <alias> ] [...]\n\ |
| 111 | | mutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -D\n\ |
| 112 | | mutt [ -nx ] [ -e <cmd> ] [ -a <file> ] [ -F <file> ] [ -H <file> ] [ -i <file> ] [ -s <subj> ] [ -b <addr> ] [ -c <addr> ] [ -- ] <addr> [ ... ]\n\ |
| 113 | | mutt [ -n ] [ -e <cmd> ] [ -F <file> ] -p\n\ |
| | 108 | "usage: mutt [<options>] [-z] [-f <file> | -yZ]\n\ |
| | 109 | mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a <file> [...]] [--] <addr> [...]\n\ |
| | 110 | mutt [<options>] -p\n\ |
| | 111 | mutt [<options>] -A <alias> [...]\n\ |
| | 112 | mutt [<options>] -Q <query> [...]\n\ |
| | 113 | mutt [<options>] -D\n\ |
| 114 | 114 | mutt -v[v]\n"); |
| 115 | 115 | |
| … |
… |
|
| 144 | 144 | -Z\t\topen the first folder with new message, exit immediately if none\n\ |
| 145 | 145 | -h\t\tthis help message"); |
| 146 | | puts _(" --\t\ttreat remaining arguments as addr even if starting with a dash"); |
| | 146 | puts _(" --\t\ttreat remaining arguments as addr even if starting with a dash\n\ |
| | 147 | \t\twhen using -a with multiple filenames using -- is mandatory"); |
| 147 | 148 | |
| 148 | 149 | exit (0); |
| … |
… |
|
| 542 | 543 | extern char *optarg; |
| 543 | 544 | extern int optind; |
| | 545 | int attach_sep = 0; |
| 544 | 546 | |
| 545 | 547 | /* sanity check against stupid administrators */ |
| … |
… |
|
| 568 | 570 | memset (Options, 0, sizeof (Options)); |
| 569 | 571 | memset (QuadOptions, 0, sizeof (QuadOptions)); |
| 570 | | |
| | 572 | |
| | 573 | for (i = 1; i < argc; i++) |
| | 574 | if (!strcmp(argv[i], "--")) |
| | 575 | { |
| | 576 | attach_sep = i; |
| | 577 | break; |
| | 578 | } |
| | 579 | |
| 571 | 580 | while ((i = getopt (argc, argv, "A:a:b:F:f:c:Dd:e:H:s:i:hm:npQ:RvxyzZ")) != EOF) |
| 572 | 581 | switch (i) |
| … |
… |
|
| 710 | 719 | |
| 711 | 720 | if (queries) |
| | 721 | { |
| | 722 | for (; optind < argc; optind++) |
| | 723 | queries = mutt_add_list (queries, argv[optind]); |
| 712 | 724 | return mutt_query_variables (queries); |
| | 725 | } |
| 713 | 726 | if (dump_variables) |
| 714 | 727 | return mutt_dump_variables(); |
| … |
… |
|
| 718 | 731 | int rv = 0; |
| 719 | 732 | ADDRESS *a; |
| | 733 | for (; optind < argc; optind++) |
| | 734 | alias_queries = mutt_add_list (alias_queries, argv[optind]); |
| 720 | 735 | for (; alias_queries; alias_queries = alias_queries->next) |
| 721 | 736 | { |
| … |
… |
|
| 734 | 749 | return rv; |
| 735 | 750 | } |
| 736 | | |
| | 751 | |
| | 752 | /* if an -a option is present, all non-option arguments before -- are considered attachments */ |
| | 753 | if (attach) |
| | 754 | for (; optind <= attach_sep; optind++) |
| | 755 | attach = mutt_add_list (attach, argv[optind]); |
| | 756 | |
| 737 | 757 | if (newMagic) |
| 738 | 758 | mx_set_magic (newMagic); |