zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] _dmidecode and _adb completion
@ 2017-03-16  9:21 Ko Stoffelen
  2017-03-16 10:43 ` Daniel Shahaf
  0 siblings, 1 reply; 3+ messages in thread
From: Ko Stoffelen @ 2017-03-16  9:21 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 681 bytes --]

Hi,

I'm using zsh 5.3.1 and dmidecode 3.0. If I press tab after entering
"sudo dmidecode " or "dmidecode ", the following error message is displayed:

_arguments:comparguments:319: invalid rest argument definition: *(-s
--string --dump-bin)-t+[only display entries of specified type]:entry
type:(bios system baseboard chassis processor memory cache connector slot)

The same happens after "dmidecode -s ".

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.
This does not seem like desired behaviour. I'd prefer my program to only
execute after I've pressed the enter key.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 862 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] _dmidecode and _adb completion
  2017-03-16  9:21 [BUG] _dmidecode and _adb completion Ko Stoffelen
@ 2017-03-16 10:43 ` Daniel Shahaf
  2017-03-16 20:48   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Shahaf @ 2017-03-16 10:43 UTC (permalink / raw)
  To: Ko Stoffelen; +Cc: zsh-workers

Ko Stoffelen wrote on Thu, Mar 16, 2017 at 10:21:29 +0100:
> _arguments:comparguments:319: invalid rest argument definition: *(-s
> --string --dump-bin)-t+[only display entries of specified type]:entry
> type:(bios system baseboard chassis processor memory cache connector slot)

Thanks for the report.  Fixed in 072e75f9b8a89711a99fb3c6ebd635ad7c23f37b.

> 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.
> This does not seem like desired behaviour. I'd prefer my program to only
> execute after I've pressed the enter key.

I agree but I don't know how to fix this.

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] _dmidecode and _adb completion
  2017-03-16 10:43 ` Daniel Shahaf
@ 2017-03-16 20:48   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2017-03-16 20:48 UTC (permalink / raw)
  To: Ko Stoffelen, zsh-workers

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-16 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  9:21 [BUG] _dmidecode and _adb completion Ko Stoffelen
2017-03-16 10:43 ` Daniel Shahaf
2017-03-16 20:48   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).