Commit 4685a6cf authored by Ramkumar Ramachandra's avatar Ramkumar Ramachandra Committed by Arnaldo Carvalho de Melo

perf completion: Strip function_exists ()

Use "type" to check existence consistently.
Signed-off-by: default avatarRamkumar Ramachandra <artagnon@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1372941691-14684-6-git-send-email-artagnon@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7b6c48e1
# perf completion
function_exists()
{
declare -F $1 > /dev/null
return $?
}
function_exists __ltrim_colon_completions ||
type __ltrim_colon_completions &>/dev/null ||
__ltrim_colon_completions()
{
if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment