Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
am cb255e5: am 8985d03: am 88dcfcc: Merge "Add bash completion to env…
Browse files Browse the repository at this point in the history
…setup"

* commit 'cb255e514093eaa839b1ac2487bdc2ec60797415':
  Add bash completion to envsetup
  • Loading branch information
kruton authored and Android Git Automerger committed Jul 15, 2011
2 parents 8264e8f + cb255e5 commit 5cc2e94
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,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()
Expand Down Expand Up @@ -1138,3 +1161,5 @@ do
. $f
done
unset f

addcompletions

0 comments on commit 5cc2e94

Please sign in to comment.