Bug 140266 - bashrc independant of grep
|
Bug#:
140266
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: base-system@gentoo.org
|
Reported By: michael@smith-li.com
|
|
Component: Core system
|
|
|
URL:
http://roy.marples.name/node/267
|
|
Summary: bashrc independant of grep
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-07-13 11:50 0000
|
Per Roy's blog, I thought it would be more elegant if bashrc weren't dependant
on grep. (The bash ebuild doesn't state any direct dependency on grep anyway,
so it's a bit broken that bashrc uses it by default.)
To be attached shortly: a very slightly modified bashrc that doesn't use grep
(but is only useful for >=app-shells/bash-3.0 )
the unstated depend on grep is correct ... you cant even boot Gentoo without
grep, so having a few errors in bashrc is the least of your problems
however, i still see `grep` in your proposed bashrc :P
Created an attachment (id=91792) [details]
bashrc
Oops! That's a redundant block of code that I forgot to delete. :-S
Yeah, I didn't really expect you to go "Wow, let's totally change the way we've
been using UNIX-like systems for the last 30 years because bash got smarter."
This is more a proof-of-concept. But it does work, and as Roy demonstrated,
it's a bit faster than grep. No harm there -- that's why I filed it as a
feature enhancement. That's what it is :-)
actually, you dont even need to use =~ since it isnt a regular expression
[[ $'\n'$(</etc/DIR_COLORS)$'\n' == *$'\n'"TERM ${safe_term}"$'\n'* ]]
Created an attachment (id=91847) [details]
bashrc
(In reply to comment #4)
> actually, you dont even need to use =~ since it isnt a regular expression
Right you are, sir, and I think you just demonstrated a way this will work with
bash versions earlier than 3.
why did you comment out the last line ?
Oops again :-/
I set it that way for testing, and forgot to remove the '#'. I guess the EPA
hates me.
Well, looks good to me - but uncomment the last line before it's comitted.