[opensuse] 13.1 - where to turn off 3-line: if ' ' is not a typo ... & colored grep?
All, In 13.1, if the command is not found, you get a 3-line narrative explaining it may be a typo. e.g: [13:06 alchemy:.../aoo/en-US/RPMS] # dog If 'dog' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf dog I just want the good old: 13:10 nirvana:/srv/http/dl/bugs/moz> dog -bash: dog: command not found Where do I turn this long version off? It seems like I've done this before, but it has been years and I can't remember where to do it? Also (related), when I use grep, the search term in the results is colored red. E.g (openoffice is red below): [12:20 alchemy:.../aoo/en-US/RPMS] # rpm -qa | grep openoffice openoffice-core05-4.1.0-9764.x86_64 openoffice-brand-en-US-4.1.0-9764.x86_64 openoffice-math-4.1.0-9764.x86_64 openoffice-onlineupdate-4.1.0-9764.x86_64 ^^^^^^^^^^ red How do I turn this off so I just get plain search results back? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/14/2014 11:21 AM, David C. Rankin wrote:
All,
In 13.1, if the command is not found, you get a 3-line narrative explaining it may be a typo. e.g:
[13:06 alchemy:.../aoo/en-US/RPMS] # dog If 'dog' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf dog
I just want the good old:
13:10 nirvana:/srv/http/dl/bugs/moz> dog -bash: dog: command not found
Where do I turn this long version off? It seems like I've done this before, but it has been years and I can't remember where to do it?
Also (related), when I use grep, the search term in the results is colored red. E.g (openoffice is red below):
[12:20 alchemy:.../aoo/en-US/RPMS] # rpm -qa | grep openoffice openoffice-core05-4.1.0-9764.x86_64 openoffice-brand-en-US-4.1.0-9764.x86_64 openoffice-math-4.1.0-9764.x86_64 openoffice-onlineupdate-4.1.0-9764.x86_64 ^^^^^^^^^^ red
How do I turn this off so I just get plain search results back?
Hi David, For the "command not found" thing, just add: unset command_not_found_handle to ~/.bashrc I don't know about the color thing... Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/14/2014 01:30 PM, Lew Wolfgang wrote:
Hi David,
For the "command not found" thing, just add:
unset command_not_found_handle
to ~/.bashrc
Thanks Lew! I'll do it, and then look for the system wide setting to nuke it for all. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-07-14 20:56, David C. Rankin wrote:
On 07/14/2014 01:30 PM, Lew Wolfgang wrote:
I'll do it, and then look for the system wide setting to nuke it for all.
/etc/bash.bashrc.local /etc/bash_command_not_found -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 07/14/2014 02:05 PM, Carlos E. R. wrote:
On 2014-07-14 20:56, David C. Rankin wrote:
On 07/14/2014 01:30 PM, Lew Wolfgang wrote:
I'll do it, and then look for the system wide setting to nuke it for all.
/etc/bash.bashrc.local /etc/bash_command_not_found
Even better: bash.bashrc sources /etc/bash_command_not_found: if test -f /etc/bash_command_not_found ; then . /etc/bash_command_not_found So to make it permanent: alchemy:/etc # mv bash_command_not_found bash_command_not_found.sav :-) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/14/2014 08:21 PM, David C. Rankin wrote:
Also (related), when I use grep, the search term in the results is colored red. E.g (openoffice is red below):
[12:20 alchemy:.../aoo/en-US/RPMS] # rpm -qa | grep openoffice openoffice-core05-4.1.0-9764.x86_64 openoffice-brand-en-US-4.1.0-9764.x86_64 openoffice-math-4.1.0-9764.x86_64 openoffice-onlineupdate-4.1.0-9764.x86_64 ^^^^^^^^^^ red
How do I turn this off so I just get plain search results back?
You don't invoke the grep binary here directly, but rather an alias: $ type grep grep is aliased to `grep --color=auto' Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/15/2014 12:26 AM, Bernhard Voelker wrote:
On 07/14/2014 08:21 PM, David C. Rankin wrote:
Also (related), when I use grep, the search term in the results is colored red. E.g (openoffice is red below):
[12:20 alchemy:.../aoo/en-US/RPMS] # rpm -qa | grep openoffice openoffice-core05-4.1.0-9764.x86_64 openoffice-brand-en-US-4.1.0-9764.x86_64 openoffice-math-4.1.0-9764.x86_64 openoffice-onlineupdate-4.1.0-9764.x86_64 ^^^^^^^^^^ red
How do I turn this off so I just get plain search results back?
You don't invoke the grep binary here directly, but rather an alias:
$ type grep grep is aliased to `grep --color=auto'
Have a nice day, Berny
Thanks Berny, Indeed... (smacks self...) What a mess: set | grep grep __git_log_shortlog_options=$'\n\t--author= --committer= --grep=\n\t--all-match\n' git help -a | egrep --color=auto --color=never '^ [a-zA-Z0-9]'; svn_upstream=($(git log --first-parent -1 --grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null)); color.grep color.grep.context color.grep.filename color.grep.function color.grep.linenumber color.grep.match color.grep.selected color.grep.separator _git_grep () COMPREPLY=($( $1 --help 2>&1 | sed -e '/--/!d' -e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | grep "^$cur" | sort -u )); grep header import mail new next patches pop previous push refresh \ grep) _longopt grep; for foo in $(LC_ALL=C $SCOUT 2>&1 | sed -e "1,/Available modules:/d" | egrep [a-z] | awk -F ' ' '{print $1}'); if ( $SCOUT $prevprev --listrepos | egrep --color=auto "\- none \-"
/dev/null ); then YAST_MODLIST=($(LC_ALL=C $YAST -l| grep '^[a-z]' | grep -v "Available")); if ls --group-directories-first --color=auto -1 "${srchdir}" | grep --color=auto ${srchstr}; then rqgrep () echo "Error: Insufficient arguments; Usage: 'rqa srch-term' # for rpm -qa | grep srch-term"; rpm -qa | grep --color=auto "$1" history | grep --color=auto $1;
??? Why is it too much to ask for 'grep' just to be 'grep' ??? Above the rqgrep() function is mine: rqgrep() { [[ -n $1 ]] || { echo "Error: Insufficient arguments; Usage: 'rqa srch-term' # for rpm -qa | grep srch-term" return 1 } rpm -qa | grep "$1" } but where the heck are all the --color=auto coming from? I'll grep around /etc, but if anybody know where this can be done, please let me know, the wasted time to turn all this unwanted stuff off is rapidly accumulating... Why can't all this optional stuff be OPTIONAL and not the DEFAULT?? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* David C. Rankin <drankinatty@suddenlinkmail.com> [07-15-14 01:48]:
On 07/15/2014 12:26 AM, Bernhard Voelker wrote: [...]
You don't invoke the grep binary here directly, but rather an alias:
$ type grep grep is aliased to `grep --color=auto'
Indeed... (smacks self...)
What a mess: [...] but where the heck are all the --color=auto coming from? I'll grep around /etc, but if anybody know where this can be done, please let me know, the wasted time to turn all this unwanted stuff off is rapidly accumulating...
~/.alias and grep -ir grep `locate alias |grep etc| grep alias` /etc/profile.d/alias.bash:alias egrep='egrep --color=auto' /etc/profile.d/alias.bash:alias fgrep='fgrep --color=auto' /etc/profile.d/alias.bash:alias grep='grep --color=auto' -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/15/2014 07:32 AM, Patrick Shanahan wrote:
~/.alias
and
grep -ir grep `locate alias|grep etc| grep alias` /etc/profile.d/alias.bash:alias egrep='egrep --color=auto' /etc/profile.d/alias.bash:alias fgrep='fgrep --color=auto' /etc/profile.d/alias.bash:alias grep='grep --color=auto'
Thanks Patrick! -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Bernhard Voelker
-
Carlos E. R.
-
David C. Rankin
-
Lew Wolfgang
-
Patrick Shanahan