perf completion: Strip function_exists ()

Use "type" to check existence consistently.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1372941691-14684-6-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Ramkumar Ramachandra 2013-07-04 18:11:29 +05:30 committed by Arnaldo Carvalho de Melo
parent 7b6c48e16e
commit 4685a6cfae

View File

@ -1,12 +1,6 @@
# perf completion # perf completion
function_exists() type __ltrim_colon_completions &>/dev/null ||
{
declare -F $1 > /dev/null
return $?
}
function_exists __ltrim_colon_completions ||
__ltrim_colon_completions() __ltrim_colon_completions()
{ {
if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then