Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] _dmidecode and _adb completion



On Mar 16, 10:43am, Daniel Shahaf wrote:
} Subject: Re: [BUG] _dmidecode and _adb completion
}
} Ko Stoffelen wrote on Thu, Mar 16, 2017 at 10:21:29 +0100:
} > Second, I noticed that by simply typing "adb " and pressing tab, adb is
} > already executed and the daemon starts running if it did not before.
} 
} I agree but I don't know how to fix this.

Completion/Unix/Command/_adb does this:

  adb ${=ADB_DEVICE_SPECIFICATION} shell exit 2>/dev/null || {
      # early bail-out until a single valid device/emulator is specified and up-and-running
      _message -r "No (started) device specified, completions do not yet work"
      ...


So as presently written you can't complete adb commands/options until
you have a running daemon against which to validate the device.

I don't have adb installed so I don't know what happens if you skip this
step (edit _adb to stick a ":" command in front of that line so it will
always succeed, for example).  If it's possible to sensibly proceed in
the absence of the daemon, then we could make the above test conditional
on a zstyle.



Messages sorted by: Reverse Date, Date, Thread, Author