gcc, lintian, make, pkgadd, slackpkg: grep -> "command grep" (Debian: #734095)

master
Ville Skyttä 2014-01-06 17:45:48 +02:00
parent 93ee00947a
commit e3edf7ac42
5 changed files with 15 additions and 14 deletions

View File

@ -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
}

View File

@ -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") )

View File

@ -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") ) )

View File

@ -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

View File

@ -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)