From 4eca8b152606594500a1dee4455e5f01aae49d95 Mon Sep 17 00:00:00 2001
From: Dennis Meier <meier.dennis@siemens.com>
Date: Thu, 12 Jun 2014 16:47:23 +0200
Subject: [PATCH] populate_sdk_base: add auto-completion in setup

It's really easy to add auto completion in the SDK setup scripts
with BASH's read -e -p. Makes life very comfortable ;-).

I already asked Paul Eggleton on IRC about the change, and our only concern
is that it could break the script in other shells than BASH. However, since
the script already starts with #!/bin/bash this shouldn't be a problem.
 
Any thoughts? I would love to see this in an upcoming release.

Regards,
Dennis

---
 meta/classes/populate_sdk_base.bbclass |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 10d04ed..a8ef60b 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -173,9 +173,8 @@ if [ $verbose = 1 ] ; then
 	set -x
 fi
 
-printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): "
 if [ "$target_sdk_dir" = "" ]; then
-	read target_sdk_dir
+	read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
 	[ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
 else
 	echo "$target_sdk_dir"
-- 
1.7.10.4

