On 06.04.13 19:58, Felipe Contreras wrote:
> On Sat, Apr 6, 2013 at 11:45 AM, Torsten Bögershausen <tbo...@web.de> wrote:
>> On 06.04.13 19:29, Felipe Contreras wrote:
>>> On Sat, Apr 6, 2013 at 11:03 AM, Torsten Bögershausen <tbo...@web.de> wrote:
>>>> --- a/contrib/remote-helpers/test-hg.sh
>>>> +++ b/contrib/remote-helpers/test-hg.sh
>>>> @@ -115,7 +115,7 @@ test_expect_success 'update bookmark' '
>>>>    git push
>>>>    ) &&
>>>> -  hg -R hgrepo bookmarks | grep "devel\s\+3:"
>>>> +  hg -R hgrepo bookmarks | egrep "devel[[:space:]]+3:"
>>>>  '
>>> I would rather use [ \t] instead.
>> That doesn't work on e.g. Mac OS.
>> [:space:] is actually portable
> Why wouldn't it work? This is from their manpage:
> A bracket expression is a list of characters enclosed by [ and ].  It
> matches any single character in
> that list; if the first character of the list is the caret ^ then it
> matches any character not in the
> list.  For example, the regular expression [0123456789] matches any
> single digit.

It's not about the "bracket list".
It's about using \t as an abreviation for TAB.
The "backslash n" as an replacement for TAB is quite often understood by many 
It is not demanded to be understood by all grep implementations, please see 
Instead of using \t you can use a literal TAB.
Contact your local editor how to put that inte source code ;-)


9.3.2 BRE Ordinary Characters

An ordinary character is a BRE that matches itself: any character in the 
supported character set, except for the BRE special characters listed in BRE 
Special Characters.

The interpretation of an ordinary character preceded by a backslash ( '\' ) is 
undefined, except for:

    The characters ')', '(', '{', and '}'

    The digits 1 to 9 inclusive (see BREs Matching Multiple Characters)

    A character inside a bracket expression

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to