[PATCH 4 of 9] grep: add -e option for specifying multiple patterns
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Oct 14 21:13:23 UTC 2012
On 14 oct. 2012, at 22:54, Idan Kamara wrote:
> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1350073273 -7200
> # Node ID 06edbeb509881597122b46de831da4332076c4a1
> # Parent 806bab6620c0308b61a4cf9c0e95927650ccb513
> grep: add -e option for specifying multiple patterns
Why do we need that ?
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -2885,12 +2885,15 @@
> + ('e', 'regexp', [],
> + _('use this pattern to find matches (must be used if a pattern'
> + ' starts with -), multiple patterns are or-ed'), _('PATTERN')),
We already have the "--" idioms to handle patterns that match with "-"
hg grep -- -babar
And we already have "|" in regexp to specify multiple or-ed pattern
hg grep babar|celestine
what does this -E birng new ? why is it necessary
--
Pierre-Yves
More information about the Mercurial-devel
mailing list