mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 18:30:54 +07:00
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:
parent
7b6c48e16e
commit
4685a6cfae
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user