am 88dcfccb: Merge "Add bash completion to envsetup"

* commit '88dcfccb5b064735177e1a87f578d6c734b47bc7':
  Add bash completion to envsetup
This commit is contained in:
Kenny Root 2011-07-15 14:50:05 -07:00 committed by Android Git Automerger
commit 8985d03378
1 changed files with 25 additions and 0 deletions

View File

@ -184,6 +184,29 @@ function settitle()
fi 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 case `uname -s` in
Linux) Linux)
function choosesim() function choosesim()
@ -1106,3 +1129,5 @@ do
. $f . $f
done done
unset f unset f
addcompletions