aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2016-05-03 19:49:17 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-03 19:49:17 +0000
commit0e02ab0fde51c5d7cf58232850c5b6ff6c258dd6 (patch)
tree31d756de4e636cca46d2de870e0b3aef100052f1
parent317031cb0035803f54c21cc78ea7cf830a247865 (diff)
parent94cd68b4606df4bca9101875662eb21734484630 (diff)
downloadplatform_sdk-0e02ab0fde51c5d7cf58232850c5b6ff6c258dd6.tar.gz
platform_sdk-0e02ab0fde51c5d7cf58232850c5b6ff6c258dd6.tar.bz2
platform_sdk-0e02ab0fde51c5d7cf58232850c5b6ff6c258dd6.zip
Merge "adb completion: call _init_completion if available" am: 1fa245bca1 am: e40f505ad8 am: 275c334042
am: 94cd68b460 * commit '94cd68b4606df4bca9101875662eb21734484630': adb completion: call _init_completion if available Change-Id: I14a3a951d7a4ce4aa67d55beee98d7e60ea8a847
-rw-r--r--bash_completion/adb.bash9
1 files changed, 5 insertions, 4 deletions
diff --git a/bash_completion/adb.bash b/bash_completion/adb.bash
index 4b10e14fc..3017bfa2e 100644
--- a/bash_completion/adb.bash
+++ b/bash_completion/adb.bash
@@ -16,13 +16,14 @@
#
_adb() {
- unset -v have
- type $1 &> /dev/null && have="yes"
-
- if [ "$have" != "yes" ]; then
+ if ! type -t "$1" >/dev/null; then
return
fi
+ if type -t _init_completion >/dev/null; then
+ _init_completion || return
+ fi
+
local where i cur serial
COMPREPLY=()