Add tab completion for lunch.
Change-Id: I4ddfffe8fe4519665a5a66aa60990f900a9ba80a
diff --git a/envsetup.sh b/envsetup.sh
index ab5253b..96684d9 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -547,6 +547,19 @@
printconfig
}
+# Tab completion for lunch.
+function _lunch()
+{
+ local cur prev opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ COMPREPLY=( $(compgen -W "${LUNCH_MENU_CHOICES[*]}" -- ${cur}) )
+ return 0
+}
+complete -F _lunch lunch
+
# Configures the build to build unbundled apps.
# Run tapas with one ore more app names (from LOCAL_PACKAGE_NAME)
function tapas()