From 1cb99a21acb8135d5d7eee713af4c0582cd64790 Mon Sep 17 00:00:00 2001 From: Andrzej Zabost Date: Tue, 10 Aug 2021 19:42:52 +0200 Subject: [PATCH] fix(avd): fix starting n-th AVD by removing preceding number --- plugins/avd/avd.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/avd/avd.plugin.zsh b/plugins/avd/avd.plugin.zsh index 9e3b6138e..7fd4feea3 100644 --- a/plugins/avd/avd.plugin.zsh +++ b/plugins/avd/avd.plugin.zsh @@ -65,7 +65,8 @@ function avd() { return fi - avd_name=$(avds | head -"$avd_number" | tail -1) + # Print only the n-th AVD and remove the number prefix added by 'grep -n' + avd_name=$(avds | head -"$avd_number" | tail -1 | sed -E 's/^[0-9]+://') echo "Starting emulator: $avd_name" emulator_path=$(find_emulator)