From 91763e93e67bc0bd727c982eaeff99942c9e91ed Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 3 Oct 2019 15:13:12 -0700 Subject: [PATCH] Fix lunch choices w/zsh zsh doesn't split variables (by default), but it will split command output. bash will split both. Apparently a portable way to do this in both is to just turn it into another command: "$(echo $var)". Test: source build/envsetup.sh; lunch (see list; repeat in bash and zsh) Change-Id: I9716a8d77aefdf05da8923deb9e37e0b6132b549 --- envsetup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envsetup.sh b/envsetup.sh index f91b82058..db86d9200 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -580,7 +580,7 @@ function print_lunch_menu() local i=1 local choice - for choice in $choices + for choice in $(echo $choices) do echo " $i. $choice" i=$(($i+1))