diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-14 12:47:32 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-14 12:53:35 +0200 |
commit | d4582ca1b9a2d117f6f8db8fc5963c27f8c1fad4 (patch) | |
tree | 034a41b298f8ff8b576760c9c2509c0d4799b3c8 /doc | |
parent | 4ba094cd136becc8ad41bb7a98ffccec5e48d59b (diff) | |
download | mailutils-d4582ca1b9a2d117f6f8db8fc5963c27f8c1fad4.tar.gz mailutils-d4582ca1b9a2d117f6f8db8fc5963c27f8c1fad4.tar.bz2 |
pick: improve compatibility.
The traditional component matching syntax, `--COMP STRING', is
accepted, provided at least one of the following conditions is met:
1. The word `COMP' contains at least one capital letter;
2. The word `COMP' ends with a colon;
3. Standard input is not connected to a terminal.
* mh/mh_getopt.c (mh_help_hook): New global variable.
(mh_help): Call mh_help_hook, if set.
* mh/mh_getopt.h (mh_help_hook): New extern.
* mh/pick.c (doc): Update.
(opt_handler): Remove ARGP_KEY_ERROR case.
(pick_help_hook): New function.
(main): Convert any instance of `--comp string' to
`--component=comp --pattern=string', if comp contains a
capital letter or ends with a colon, or fd 0 is not connected
to terminal.
* doc/texinfo/mu-mh.texi: Document changes to pick.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/texinfo/mu-mh.texi | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/texinfo/mu-mh.texi b/doc/texinfo/mu-mh.texi index dc8567aae..b04a34c0f 100644 --- a/doc/texinfo/mu-mh.texi +++ b/doc/texinfo/mu-mh.texi @@ -332,11 +332,20 @@ The @code{rmmproc} profile component is not used. @item pick -The non-standard command line syntax @option{--@var{field} -@var{string}}), where @var{field} is any string, is deprecated. It is -recognized only if @command{pick} is called from within another -program, so that existing application continue to work. Please use the -following syntax instead: +The command line syntax @option{--@var{component} @var{string}}) is +recognized only if at least one of the following conditions is met: + +@itemize @bullet +@item The word @var{component} contains at least one capital letter. +E.g. @option{--User-Agent Mailutils}. + +@item The word @var{component} ends with a colon, as in +@option{user-agent: Mailutils}. + +@item Standard input is not connected to a terminal. +@end itemize + +The GNU syntax for component matching is: @smallexample pick --component @var{field} --pattern @var{string} |