Opened 9 years ago

Closed 5 years ago

#6540 closed enhancement (no change required)

Request to evaluate freegrep as a replacement for GNU grep

Reported by: l_n Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/Development
Keywords: grep Cc: mdisreali@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I recently ported freegrep to Haiku, which is BSD-licensed. Since its license is more in line with the Haiku system license, I thought it may be good to incorporate it as the system grep in Haiku. The binary and source are at http://haikuware.com/directory/view-details/utilities/command-line-shell/freegrep .

Change History (7)

comment:1 Changed 9 years ago by mmadia

Component: ApplicationsApplications/Command Line Tools

comment:2 Changed 9 years ago by l_n

I've discovered that freegrep has issues with mimetype-tagged text files. For some reason, it thinks they are binary files. I think this has something to do with f->noseek (which seems to be used as the test for whether a file is binary or text) being set by a call to isatty(fd) (where 'fd' is the filedescriptor for the current file being searched).

comment:3 Changed 9 years ago by Disreali

Cc: mdisreali@… added

Does it make a difference if the files have been "Identified" or are still seen as 'Generic File'?

comment:4 Changed 8 years ago by Disreali

Has any progress been made on getting this to work properly?

comment:5 Changed 8 years ago by l_n

I've not worked with/on Haiku in quite a while. I may take it back up at some point. My thoughts on fixing it were to change the test case to a BeAPI call or some other more conventional method..

comment:6 Changed 8 years ago by Disreali

According to the todo file in NetBSD's version, the issue with freegrep's binary file detection is a known issue.

comment:7 Changed 5 years ago by pulkomandy

Resolution: no change required
Status: newclosed

freegrep has not been updated since 2010, as it was included in "base" FreeBSD (and probably the other *BSDs too).

Now that we have switched to package management, you can easily switch grep implementations anyway.

Note: See TracTickets for help on using tickets.