buggrep - Bugs: bug #29876, --include not working as expected

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29876: --include not working as expected

Submitted by:  None
Submitted on:  Thu 13 May 2010 02:28:20 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sat 14 Aug 2010 08:23:45 PM UTC, comment #2:

Thanks again for the report.
That bug is now fixed via this patch:

http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3127/focus=3160

Jim Meyering <meyering>
Project Administrator
Fri 23 Jul 2010 03:45:28 AM UTC, comment #1:

2.6.3 --include doesn't work as 2.5.4 does.

For instance:

$ mkdir foo
$ cd foo
$ echo 1 > 1
$ echo 2 > 2
$ grep2.5.4 -P --include=[12] "\d" *
1:1
2:2
$ grep2.6.3 -P --include=[12] "\d" *
$

Joe Perches <joeperches>
Thu 13 May 2010 02:28:20 PM UTC, original submission:

The --include option seems completely broken to me. I am using v2.6.3 on Arch Linux.

Example:

# Normal recursive grep works ok...
[alan@perry] ~/test
$ grep -Rl test *
subdir/test.cpp
test.cpp

# test.cpp in the current directory isn't returned
[alan@perry] ~/test
$ grep -Rl --include=\*.cpp test *
subdir/test.cpp

# I only asked for .h files, why is a .cpp file being returned?
[alan@perry] ~/test
$ grep -Rl --include=\*.h test *
test.cpp

# Non-recursive, nothing gets returned.
[alan@perry] ~/test
$ grep -l --include=\*.cpp test *

# Non-recursive, wrong file type returned.
[alan@perry] ~/test
$ grep -l --include=\*.h test *
test.cpp

I've tried using various combinations of backslashes, single and double quotes on the --include parameter, but to no avail.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by meyering (Posted a comment)
  • -email is unavailable- added by bonzini (Updated the item)
  • -email is unavailable- added by joeperches (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-30 bonzini Open/ClosedOpen => Closed
    2010-08-14 meyering StatusConfirmed => Fixed
    2010-07-25 bonzini StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.3