[Bash-completion-commits] [bash-completion] 03/03: gcc, lintian, make, pkgadd, slackpkg: grep -> "command grep" (Debian: #734095)

Ville Skyttä scop-guest at moszumanska.debian.org
Mon Jan 6 15:48:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit e3edf7ac423179f70acbd77d9ffbbf5cfa91ce58
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Jan 6 17:45:48 2014 +0200

    gcc, lintian, make, pkgadd, slackpkg: grep -> "command grep" (Debian: #734095)
---
 completions/gcc      |  8 ++++----
 completions/lintian  | 12 ++++++------
 completions/make     |  2 +-
 completions/pkgadd   |  3 ++-
 completions/slackpkg |  4 ++--
 5 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/completions/gcc b/completions/gcc
index 481d9cf..5e3cbf7 100644
--- a/completions/gcc
+++ b/completions/gcc
@@ -50,16 +50,16 @@ _gcc()
 } &&
 complete -F _gcc gcc g++ gfortran g77 g95 gcj gpc &&
 {
-    cc  --version 2>/dev/null | grep -q GCC || \
+    cc  --version 2>/dev/null | command grep -q GCC || \
         [[ $( _realcommand cc ) == *gcc* ]] && \
         complete -F _gcc cc  || complete -F _minimal cc
-    c++ --version 2>/dev/null | grep -q GCC || \
+    c++ --version 2>/dev/null | command grep -q GCC || \
         [[ $( _realcommand c++ ) == *g++* ]] && \
         complete -F _gcc c++ || complete -F _minimal c++
-    f77 --version 2>/dev/null | grep -q GCC || \
+    f77 --version 2>/dev/null | command grep -q GCC || \
         [[ $( _realcommand f77 ) == *gfortran* ]] && \
         complete -F _gcc f77 || complete -F _minimal f77
-    f95 --version 2>/dev/null | grep -q GCC || \
+    f95 --version 2>/dev/null | command grep -q GCC || \
         [[ $( _realcommand f95 ) == *gfortran* ]] && \
         complete -F _gcc f95 || complete -F _minimal f95
 }
diff --git a/completions/lintian b/completions/lintian
index 3867c5e..05e7c20 100644
--- a/completions/lintian
+++ b/completions/lintian
@@ -8,8 +8,8 @@ _lintian_tags()
     if [[ "$cur" == *, ]]; then
         search=${cur//,/ }
         for item in $search; do
-            match=$(grep -nE "^Tag: $item$" /usr/share/lintian/checks/*.desc \
-                    | cut -d: -f1 )
+            match=$( command grep -nE "^Tag: $item$" \
+                /usr/share/lintian/checks/*.desc | cut -d: -f1 )
             tags=$( sed -e "s/\<$item\>//g" <<<$tags )
         done
         COMPREPLY+=( $(compgen -W "$tags") )
@@ -30,8 +30,8 @@ _lintian_checks()
     if [[ "$cur" == *, ]]; then
         search=${cur//,/ }
         for item in $search; do
-            match=$(grep -nE "^(Check-Script|Abbrev): $item$" \
-                    /usr/share/lintian/checks/*.desc | cut -d: -f1 )
+            match=$( command grep -nE "^(Check-Script|Abbrev): $item$" \
+                /usr/share/lintian/checks/*.desc | cut -d: -f1 )
             todisable=$( awk '/^(Check-Script|Abbrev)/ { print $2 }' $match )
             for name in $todisable; do
                 checks=$( sed -e "s/\<$name\>//g" <<<$checks )
@@ -55,8 +55,8 @@ _lintian_infos()
     if [[ "$cur" == *, ]]; then
         search=${cur//,/ }
         for item in $search; do
-            match=$( grep -nE "^Collector: $item$" \
-                    /usr/share/lintian/collection/*.desc | cut -d: -f1 )
+            match=$( command grep -nE "^Collector: $item$" \
+                /usr/share/lintian/collection/*.desc | cut -d: -f1 )
             infos=$( sed -e "s/\<$item\>//g" <<<$infos )
         done
         COMPREPLY+=( $(compgen -W "$infos") )
diff --git a/completions/make b/completions/make
index 304a4b4..b6683b8 100644
--- a/completions/make
+++ b/completions/make
@@ -142,7 +142,7 @@ _make()
             mode=-d # display-only mode
         fi
 
-        local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
+        local reset=$( set +o | command grep -F posix ); set +o posix # <(...)
         COMPREPLY=( $( LC_ALL=C \
             make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
             sed -nf <(_make_target_extract_script $mode "$cur") ) )
diff --git a/completions/pkgadd b/completions/pkgadd
index 2809881..b49cb20 100644
--- a/completions/pkgadd
+++ b/completions/pkgadd
@@ -48,7 +48,8 @@ _pkgadd ()
                     done
                         pkginst_list="${pkginst_list[@]}"
                 else
-                    pkginst_list=$(strings $(dequote $device) | grep "^PKG=" | sort -u | cut -d= -f2)
+                    pkginst_list=$(strings $(dequote $device) | \
+                        command grep "^PKG=" | sort -u | cut -d= -f2)
             fi
             COMPREPLY=( $(compgen -W "$pkginst_list" -- ${cur}) )
         fi
diff --git a/completions/slackpkg b/completions/slackpkg
index dab9c6d..cdacb18 100644
--- a/completions/slackpkg
+++ b/completions/slackpkg
@@ -79,12 +79,12 @@ _slackpkg()
             COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
                 xap xfce y' -- "$cur" ) )
             COMPREPLY+=( $( cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
-                grep "^$cur" ) )
+                command grep "^$cur" ) )
             return
             ;;
         info)
             COMPREPLY=( $( cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
-                grep "^$cur" ) )
+                command grep "^$cur" ) )
             return
             ;;
         update)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list