#734095 bash-completion: Please replace 'grep' with 'command grep' within several functions. #734095
- Package:
- bash-completion
- Source:
- bash-completion
- Submitter:
- Tomasz NowiÅski
- Date:
- 2019-10-14 08:15:04 UTC
- Severity:
- normal
Hi, In my shell I have defined a custom "grep" function that overrides the original command. If I try to use make in directory without Makefile or with some makefiles, i get error from grep "grep: conflicting matchers specified", because my grep uses -E. Replacement 'grep' with 'command grep' 144c144 < local reset=$( set +o | grep -F posix ); set +o posix # for <(...) --- <(...) resolves the problem. This is not only example of using grep not directly from it's path: $ grep '\<grep ' /usr/share/bash-completion/completions/*| grep -v '(command\ |\.)grep' /usr/share/bash-completion/completions/c++: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/c++: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/cc: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/cc: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/colormake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/dict: # it down with grep if $cur looks like something that's safe to embed /usr/share/bash-completion/completions/g++: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/g++: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/g77: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/g77: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gcc: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/gcc: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gcj: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/gcj: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gmake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/gnumake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/gpc: cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || : /usr/share/bash-completion/completions/gpc: c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || : /usr/share/bash-completion/completions/lintian: tags=$( grep -e ^Tag /usr/share/lintian/checks/*.desc | cut -d\ -f2 ) /usr/share/bash-completion/completions/lintian: match=$(grep -nE "^Tag: $item$" /usr/share/lintian/checks/*.desc \ /usr/share/bash-completion/completions/lintian: checks=$(grep -e ^Check- Script -e ^Abbrev \ /usr/share/bash-completion/completions/lintian: match=$(grep -nE "^(Check-Script|Abbrev): $item$" \ /usr/share/bash-completion/completions/lintian: todisable=$(grep -e ^Check-Script -e ^Abbrev $match | \ /usr/share/bash-completion/completions/lintian: infos=$(grep -e ^Collector /usr/share/lintian/collection/*.desc \ /usr/share/bash-completion/completions/lintian: match=$( grep -nE "^Collector: $item$" \ /usr/share/bash-completion/completions/lintian-info: tags=$( grep -e ^Tag /usr/share/lintian/checks/*.desc | cut -d\ -f2 ) /usr/share/bash-completion/completions/lintian-info: match=$(grep -nE "^Tag: $item$" /usr/share/lintian/checks/*.desc \ /usr/share/bash-completion/completions/lintian-info: checks=$(grep -e ^Check-Script -e ^Abbrev \ /usr/share/bash-completion/completions/lintian-info: match=$(grep -nE "^(Check-Script|Abbrev): $item$" \ /usr/share/bash-completion/completions/lintian-info: todisable=$(grep -e ^Check-Script -e ^Abbrev $match | \ /usr/share/bash-completion/completions/lintian-info: infos=$(grep -e ^Collector /usr/share/lintian/collection/*.desc \ /usr/share/bash-completion/completions/lintian-info: match=$( grep -nE "^Collector: $item$" \ /usr/share/bash-completion/completions/make: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/pkgadd: pkginst_list=$(strings $(dequote $device) | grep "^PKG=" | sort -u | cut -d= -f2) /usr/share/bash-completion/completions/pmake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/rdict: # it down with grep if $cur looks like something that's safe to embed /usr/share/bash-completion/completions/slackpkg:# options list is based on `grep '\-.*\=.*)' /usr/sbin/slackpkg | cut -f1 -d\)` /usr/share/bash-completion/completions/slackpkg: grep "^$cur" ) ) /usr/share/bash-completion/completions/slackpkg: grep "^$cur" ) ) Regards TN
Thanks!
Hi, This bugs came back in version 2.1-3! $ grep '\<grep ' /usr/share/bash-completion/completions/*| grep -v '(command |\.)grep' /usr/share/bash-completion/completions/c++: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/c++: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/cc: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/cc: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/colormake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/dict: # it down with grep if $cur looks like something that's safe to embed /usr/share/bash-completion/completions/g++: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/g++: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/g77: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/g77: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gcc: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/gcc: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gcj: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/gcj: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/gmake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/gnumake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/gpc: cc --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc cc || : /usr/share/bash-completion/completions/gpc: c++ --version 2>/dev/null | grep -q 'GCC\|Debian' && complete -F _gcc c++ || : /usr/share/bash-completion/completions/lintian: tags=$( grep -e ^Tag /usr/share/lintian/checks/*.desc | cut -d\ -f2 ) /usr/share/bash-completion/completions/lintian: match=$(grep -nE "^Tag: $item$" /usr/share/lintian/checks/*.desc \ /usr/share/bash-completion/completions/lintian: checks=$(grep -e ^Check-Script -e ^Abbrev \ /usr/share/bash-completion/completions/lintian: match=$(grep -nE "^(Check-Script|Abbrev): $item$" \ /usr/share/bash-completion/completions/lintian: todisable=$(grep -e ^Check-Script -e ^Abbrev $match | \ /usr/share/bash-completion/completions/lintian: infos=$(grep -e ^Collector /usr/share/lintian/collection/*.desc \ /usr/share/bash-completion/completions/lintian: match=$( grep -nE "^Collector: $item$" \ /usr/share/bash-completion/completions/lintian-info: tags=$( grep -e ^Tag /usr/share/lintian/checks/*.desc | cut -d\ -f2 ) /usr/share/bash-completion/completions/lintian-info: match=$(grep -nE "^Tag: $item$" /usr/share/lintian/checks/*.desc \ /usr/share/bash-completion/completions/lintian-info: checks=$(grep -e ^Check-Script -e ^Abbrev \ /usr/share/bash-completion/completions/lintian-info: match=$(grep -nE "^(Check-Script|Abbrev): $item$" \ /usr/share/bash-completion/completions/lintian-info: todisable=$(grep -e ^Check-Script -e ^Abbrev $match | \ /usr/share/bash-completion/completions/lintian-info: infos=$(grep -e ^Collector /usr/share/lintian/collection/*.desc \ /usr/share/bash-completion/completions/lintian-info: match=$( grep -nE "^Collector: $item$" \ /usr/share/bash-completion/completions/make: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/pkgadd: pkginst_list=$(strings $(dequote $device) | grep "^PKG=" | sort -u | cut -d= -f2) /usr/share/bash-completion/completions/pmake: local reset=$( set +o | grep -F posix ); set +o posix # for <(...) /usr/share/bash-completion/completions/rdict: # it down with grep if $cur looks like something that's safe to embed /usr/share/bash-completion/completions/slackpkg:# options list is based on `grep '\-.*\=.*)' /usr/sbin/slackpkg | cut -f1 -d\)` /usr/share/bash-completion/completions/slackpkg: grep "^$cur" ) ) /usr/share/bash-completion/completions/slackpkg: grep "^$cur" ) )
tags 734095 upstream fixed-upstream thanks It never disappeared in 2.1-2. Simply, the bug has been fixed upstream, while not in the Debian package... yet. :) Kindly, David
In the past two years I modified make file the dozen or so timesby hand, because the change is still not landed in the package... Regards TN
*Gorące pozdrowienia! Wcześniej ci pisałem, ale szkoda, że **moje e-maile nie zostały do **ciebie dostarczone; niemniej jednak przesyłam to jeszcze raz poniżej.* * Jestem adwokatem Fred Iwanga; oraz jestem prawnikiem i głównym pełnomocnikiem pracującym w obszarach podlegających jurysdykcji sądu rodzinnego. Zwracam się o zgodę na przedstawienie cię jako najbliższego krewnego mojemu zmarłemu klientowi, rodakowi z twojego kraju, któremu pomogłem w dokonaniu wpłaty inwestycyjnej o wartości ( 8,720,000.00 USD) Osiem milionów, siedemset dwadzieścia tysięcy dolarów amerykańskich w firmie finansowej. Poinformowałem firmę finansową o jego przekazaniu wraz z rodziną w drodze do pobliskiego kraju i polecono mi przedstawić każdego dostępnego członka jego rodziny lub bliskiego krewnego, aby otrzymać fundusze. Moim powodem skontaktowania się z Tobą w tej sprawie jest to, że masz takie samo nazwisko jak mój zmarły klient. I znowu nie ma zarejestrowanego spadkobiercy w jego pliku konta w firmie finansowej. Chcę, aby lewy fundusz został przekazany pod opiekę spadkobiercy jego spadkobiercy, zanim zostanie skonfiskowany przez kierownictwo firmy finansowej. Proszę o kontakt w celu uzyskania dalszych informacji. Z poważaniem, Barr. Fred Iwanga. (Esq).*