aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2016-05-03 19:33:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-05-03 19:33:06 +0000
commit1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3 (patch)
tree31d756de4e636cca46d2de870e0b3aef100052f1
parent317031cb0035803f54c21cc78ea7cf830a247865 (diff)
parent77cab358b1dc292575b4dfbba0537ffcf6de82f4 (diff)
downloadplatform_sdk-1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3.tar.gz
platform_sdk-1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3.tar.bz2
platform_sdk-1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3.zip
-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=()