bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep 2.5 on recent cygwin - end-of-line problem


From: Stepan Kasal
Subject: Re: grep 2.5 on recent cygwin - end-of-line problem
Date: Wed, 27 Oct 2004 08:53:14 +0200
User-agent: Mutt/1.4.1i

Hello,

On Tue, Oct 26, 2004 at 07:55:53PM +0200, olivier Dulac wrote:
> first of all, thanks for all the good work!
> I *love* GNU utils.  (yes, that's true love, but a platonic one)

thank you very much for these words.
And thank you for writing the bug report.

> but I can't use the vim or less highlighting for some devious reasons)

Have you tried Windows vim?

> I want it to show ALL lines of a given file, with the regexp highlighted
>  (using '--color').

The best way to achieve this is
        grep --color -e 'your_regex' -e ''

> my_prompt$ egrep --color '$|the_regexp' toto
> 1 A B C D

> (this highlights the "A", but leaves a blinking cursor waiting just after
> the "D" ...)  I have to do a CTRL+C to get back the prompt [...]

> (Try 3 : WEIRDER OUTPUT!??? ) (JUST AFTER the preceding try)
> [...] but this time after I CTRL+C the next prompt is in another color

That's a bug.

It looks as if grep were writing

        START_COLOR END_COLOR  START_COLOR END_COLOR  ...

in an endless loop.  So it's half chance you break it in the "color" mode.

I know the color highlighting code in grep is buggy, I plan to fix it in
one of the next releases.

>  Q2) is my Email at the right place? if not where should I post this?

You understand it correctly, it's on the border.
If the bug were specific to the windows patform or even cygwin port,
I'd told you to go to them.
But as it stands, it's att least partly a grep bug, so we shouldn't bother
them before I fix it.  (Release 2.5.2 ?)

>  Q3) I did the tries within the Cygwin prompt (not in a CMD prompt, nor in 
> a X-window xterm)... And I read the other 2 may have different 
> properties...
>    Is there a "best place" where I should use grep in ?

I'd use it in the Cygwin prompt, it's bash shell, as on GNU/Linux.
xterm should be also bash, so it's OK too.

Windows cmd prompts (cmd.exe, command.com) are more "native".  I wouldn't
use them as they don't have tab completetion etc.
They are necessary for debugging if you want to write batch programs
with GNU utils and distribute them on computers which don't have Cygwin
installed.  (But let's just hope you won't get into that adrenaline
sport.)

>  Q4) what tools can I use, in Cygwin, to try to pin down where the actual
>   problem is ?  is "gdb" or "strace" usefull in this environement? 
[...]
>   flame me first :)
<flame>Heck, I don't know, I haven't used Cygwin much.</flame>

Then I can tell you that I'd just added some prinntf's to the grep
source to see which functions are called.  Old, reliable method.  ;-)

> And I'll try to contribute some day (when I really learn how to program,
> and get some free time, and, oh yes, find something I am actually able to
> help with!)

It's very important that you are _willing_ to contribute.
Take it easy, a good opportunity will surely come.

Have a nice day,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]