summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorAnthony King <anthonydking@slimroms.net>2015-04-30 22:57:08 +0100
committerAdnan Begovic <adnan@cyngn.com>2015-10-09 17:09:58 -0700
commit850627c7fe8e838decc83522ad15bf320bdfe89b (patch)
treebe05d3dc52beb31ca48c1ebc474523e3f1f8f48a /envsetup.sh
parent4375c68c0e9f3fab2fd5b31ee3f88389a7039a53 (diff)
downloadbuild-850627c7fe8e838decc83522ad15bf320bdfe89b.zip
build-850627c7fe8e838decc83522ad15bf320bdfe89b.tar.gz
build-850627c7fe8e838decc83522ad15bf320bdfe89b.tar.bz2
lunch: sort the choices
This will sort the lunch array when lunch is called, giving us a consistent list of devices, which is easier to search through Change-Id: I80854e8b949950cbc928121a184b64fc3b8164c8 envsetup: lunch: always sort the menu this fixes the use case of 'lunch 34' straight after envsetup Change-Id: I19d45016edf254131015aab8476bc815bec9abe4
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 4d9c58f..58b38e3 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -577,6 +577,7 @@ alias bib=breakfast
function lunch()
{
local answer
+ LUNCH_MENU_CHOICES=($(for l in ${LUNCH_MENU_CHOICES[@]}; do echo "$l"; done | sort))
if [ "$1" ] ; then
answer=$1