Bug 145096 - new features: --initial-tab and 3 newly colorized items
new features: --initial-tab and 3 newly colorized items
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-14 06:23 EST by Charles Levert
Modified: 2012-09-23 06:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-14 06:40:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
unidiff patch that implements --initial-tab and 3 newly colorized items (4.67 KB, patch)
2005-01-14 06:27 EST, Charles Levert
no flags Details | Diff
unidiff patch that implements --initial-tab and 3.5 newly colorized items (5.17 KB, patch)
2005-01-14 07:25 EST, Charles Levert
no flags Details | Diff

  None (edit)
Description Charles Levert 2005-01-14 06:23:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:

This is a patch with new features.
It is relative to <grep-2.5.1-29>.
If this isn't the latest, try applying
the patch first and contact me if it
doesn't work.

I also submitted something similar to
the <bug-gnu-utils@gnu.org> mailing
list and to
<http://savannah.gnu.org/patch/index.php?func=detailitem&item_id=3644>.

I have added the following two features:

	* A "-T" / "--initial-tab"
	  option (both invocations are
	  consistent with GNU diff).
	  This will make sure that the
	  first character of a content
	  line is on a tab stop.
	  The last separator (":") is
	  positioned immediately before
	  that so it remains possible
	  to tell whitespace at the
	  beginning of the content
	  line from whitespace used for
	  padding.  I believe it would
	  be pointless overkill to try
	  to follow the current column
	  of output after printing
	  a filename in Unicode; my
	  implementation does something
	  really simple that works.

	* Three other colors when
	  "--color" is in effect.
	  They are for the filename,
	  the numbers (line number
	  and octet offset),
	  and the separator (":").
	  These cannot be customized
	  by the user yet, but each
	  is put in its own variable
	  so everything is in place
	  for them to be.  (I didn't
	  want to add a bunch of new
	  environment variables for
	  that, and I didn't want to
	  venture a new mechanism for
	  specifying colors, possibly
	  by extending the current
	  environment variable in a
	  backward compatible way.
	  This can be done later
	  if the patch is accepted
	  and popular, and if users
	  actually request it.)

Please consider merging this patch with
your distribution's official release.



Version-Release number of selected component (if applicable):
grep-2.5.1-29

How reproducible:
Always

Steps to Reproduce:

This is not a bug.

Just try new stuff like:

sh$ grep --color=always -H files...
sh$ grep --color=always -b files...
sh$ grep --color=always -n files...
sh$ grep --color=always -Hbn files...
sh$ grep --color=always -H -T files...
sh$ grep --color=always -b -T files...
sh$ grep --color=always -n -T files...
sh$ grep --color=always -Hbn -T files...


Actual Results:  
Look damn good.  What else!?


Expected Results:  
It just works.


Additional info:
Comment 1 Charles Levert 2005-01-14 06:27:43 EST
Created attachment 109773 [details]
unidiff patch that implements --initial-tab and 3 newly colorized items
Comment 2 Tim Waugh 2005-01-14 06:40:58 EST
Best to keep the tracking all in one place.

http://savannah.gnu.org/patch/index.php?func=detailitem&item_id=3644
Comment 3 Charles Levert 2005-01-14 07:23:06 EST
Missed the "--" separator.  Use newer patch.
Will only add to Savannah after this one.
Comment 4 Charles Levert 2005-01-14 07:25:09 EST
Created attachment 109774 [details]
unidiff patch that implements --initial-tab and 3.5 newly colorized items
Comment 5 Charles Levert 2005-01-16 03:24:18 EST
Comment on attachment 109774 [details]
unidiff patch that implements --initial-tab and 3.5 newly colorized items

Get newer and evolving patches from Savannah.

Note You need to log in before you can comment on or make changes to this bug.