Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88dcfccb authored by Kenny Root's avatar Kenny Root Committed by Android Code Review
Browse files

Merge "Add bash completion to envsetup"

parents b399f5e8 52aa81ca
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -181,6 +181,29 @@ function settitle()
    fi
}

function addcompletions()
{
    local T dir f

    # Keep us from trying to run in something that isn't bash.
    if [ -z "${BASH_VERSION}" ]; then
        return
    fi

    # Keep us from trying to run in bash that's too old.
    if [ ${BASH_VERSINFO[0]} -lt 3 ]; then
        return
    fi

    dir="sdk/bash_completion"
    if [ -d ${dir} ]; then
        for f in ${dir}/[a-z]*; do
            echo "including $f"
            . $f
        done
    fi
}

case `uname -s` in
    Linux)
        function choosesim()
@@ -1103,3 +1126,5 @@ do
    . $f
done
unset f

addcompletions