Re: [Mutt] #3097: mutt's multi-file -a handling fails for
#3097: mutt's multi-file -a handling fails for POSIX-compliant getopt()
---------------------+------------------------------------------------------
Reporter: jhawk | Owner: mutt-dev
Type: defect | Status: new
Priority: minor | Milestone: 1.6
Component: mutt | Version: 1.5.17
Resolution: | Keywords: attachment -a posix getopt
---------------------+------------------------------------------------------
Comment(by pdmef):
According to synopsis, both
{{{
mutt addr1 addr2 -s "subject"
}}}
and
{{{
mutt addr1 -a file -- addr2
}}}
are unsupported (I've never even seen or used that form). If argument
reordering makes any of these work, this is a "nice to have" feature/side
effect IMHO, but we shouldn't start supporting it officially. When using
extensions such as leading - or +, we need to either provide solutions for
non-GNU-getopt or ship GNU getopt with mutt.
I don't know what the best practice to handle this type of problem is, but
how about looking for "--" first, set it to NULL, parse the option string
before it using getopt() and take the address list behind it?
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3097#comment:3>
Mutt <http://www.mutt.org/>
The Mutt mail user agent