diff options
author | Kenny Root <kroot@google.com> | 2016-05-03 19:39:58 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-05-03 19:39:58 +0000 |
commit | e40f505ad88d42655973f34c27efd562df9de7a8 (patch) | |
tree | 31d756de4e636cca46d2de870e0b3aef100052f1 | |
parent | 317031cb0035803f54c21cc78ea7cf830a247865 (diff) | |
parent | 1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3 (diff) | |
download | platform_sdk-e40f505ad88d42655973f34c27efd562df9de7a8.tar.gz platform_sdk-e40f505ad88d42655973f34c27efd562df9de7a8.tar.bz2 platform_sdk-e40f505ad88d42655973f34c27efd562df9de7a8.zip |
Merge "adb completion: call _init_completion if available"
am: 1fa245bca1
* commit '1fa245bca1e1ca7443913a52b0e8e0bb465b5fe3':
adb completion: call _init_completion if available
Change-Id: I060450788a7e78802a1780f65ab26b7eec32c349
-rw-r--r-- | bash_completion/adb.bash | 9 |
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=() |