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

Commit

Permalink
Merge "Add bash completion to envsetup"
Browse files Browse the repository at this point in the history
  • Loading branch information
kruton authored and Android Code Review committed Jul 15, 2011
2 parents b399f5e + 52aa81c commit 88dcfcc
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 @@ -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()
Expand Down Expand Up @@ -1103,3 +1126,5 @@ do
. $f
done
unset f

addcompletions

0 comments on commit 88dcfcc

Please sign in to comment.