Opened 12 years ago
Closed 12 years ago
#9044 closed bug (fixed)
[Terminal]: The output of <ef>grep should be colored
Reported by: | Prasad | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
all of the grep version have ability to colorize the output printed (using option --color). However, it seems like we are not using the capability and instead displaying the non-colored output.
It would be nice to display the colored output with grep.
Attachments (2)
Change History (9)
comment:1 by , 12 years ago
Version: | R1/alpha3 → R1/Development |
---|
by , 12 years ago
Attachment: | 0001-bash_profile-Turn-on-the-coloring-with-ef-grep.patch added |
---|
comment:2 by , 12 years ago
patch: | 0 → 1 |
---|
comment:3 by , 12 years ago
comment:4 by , 12 years ago
I think this kind of customization should go in a /etc/profile.d/colorgrep.sh script. Grep should also be outsourced to an optional package.
by , 12 years ago
Attachment: | 0001-Turn-on-the-coloring-with-ef-grep.patch added |
---|
comment:5 by , 12 years ago
A new patch as suggested by korli
From b9a483e7a45e57699492876d6a5fffc5ca3c7f8e Mon Sep 17 00:00:00 2001 From: Prasad Joshi <prasadjoshi.linux@gmail.com> Date: Fri, 5 Oct 2012 22:36:07 +0530 Subject: [PATCH] Turn on the coloring with <ef>grep All of the versions of grep have ability to display the colored output. The patch turn ons the coloring in auto mode. Fixes the ticket: https://dev.haiku-os.org/ticket/9044 Changes Since V1: - instead of modifying data/etc/profile file put create a new grep specific file in /etc/profile.d/ Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com> --- data/etc/profile.d/colorgrep.sh | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) create mode 100644 data/etc/profile.d/colorgrep.sh diff --git a/data/etc/profile.d/colorgrep.sh b/data/etc/profile.d/colorgrep.sh new file mode 100644 index 0000000..ada2d65 --- /dev/null +++ b/data/etc/profile.d/colorgrep.sh @@ -0,0 +1,3 @@ +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias grep='grep --color=auto' -- 1.7.5.4
comment:6 by , 12 years ago
Applied in hrev44680. Please note that as you're the author, you can't sign off your patch.
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Following patch fixes the problem