[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-36-g8aed79d
Ville Skyttä
ville.skytta at iki.fi
Mon Mar 21 17:24:11 UTC 2011
The following commit has been merged in the master branch:
commit 8aed79dd3e5e03bc2b91c874b9cba6fba3e9b979
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Mar 21 19:23:57 2011 +0200
Avoid some unnecessary command invocations.
diff --git a/completions/perl b/completions/perl
index 7ddfffe..f46ae16 100644
--- a/completions/perl
+++ b/completions/perl
@@ -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
diff --git a/completions/rpcdebug b/completions/rpcdebug
index be2a870..a7c5e97 100644
--- a/completions/rpcdebug
+++ b/completions/rpcdebug
@@ -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
}
--
bash-completion
More information about the Bash-completion-commits
mailing list