Avoid some unnecessary command invocations.

This commit is contained in:
Ville Skyttä 2011-03-21 19:23:57 +02:00
parent f973eb043c
commit 8aed79dd3e
2 changed files with 3 additions and 4 deletions

View File

@ -121,7 +121,7 @@ _perldoc()
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
'$( PAGER=/bin/cat man perl | \
sed -ne "/perl.*Perl overview/,/perlwin32/p" | \
awk "\$NF=2 { print \$1}" | command grep perl )' -- "$cur" ) )
awk "\$NF=2 && \$1 ~ /^perl/ { print \$1 }" )' -- "$cur" ) )
fi
_filedir 'p@(l|m|od)'
fi

View File

@ -13,9 +13,8 @@ _rpcdebug_flags()
done
if [ -n "$module" ]; then
COMPREPLY=( $( compgen -W "$(rpcdebug -vh 2>&1 \
| command grep '^'$module' '\
| awk '{$1 = ""; print $0}')" -- "$cur" ) )
COMPREPLY=( $( compgen -W "$( rpcdebug -vh 2>&1 | \
sed -ne 's/^'$module'[[:space:]]\{1,\}//p' )" -- "$cur" ) )
fi
}