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 )
Created attachment 91654 [details] bashrc I think I said it all in comment #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 attachment 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 attachment 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.
Created attachment 92138 [details] bashrc I really hope I didn't screw this one up. According to diff the only difference between this and the previous one is the uncommented last line.
added to cvs, thanks