Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: matcher-list doesn't work with some completers?
- X-seq: zsh-workers 28583
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: matcher-list doesn't work with some completers?
- Date: Thu, 6 Jan 2011 19:42:51 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=NZB06/XxjwCbrx4jNs1q9JBOrJsoAW/1U56coIngKGg=; b=dhkpFfkYSrCAgq0Ce0u8s00oR6xgunG3ZNL+lWa/Y83xe2sQMRhnKQZlVsA6amj4t4 h1jhN8xk/S7SNyebAdvqYjjhRlJHfk0h0YxSh3xRU9L4+AMI5CBmbwSVBYkWeBhRV9IK VsqOqLTDwoapS5ttjfiihxdpramDhhp2fV290=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=H3w97r1ucOJ1Nq0RjCH3+1PXm5nstYfaiushk0bH1fOVHoq70diFBi9ep3EBqPXSGr AmoTJktPbmOZPnPT+oAbta5B1O9ugTa5cJzq/PlT59XkCrpOfO2ZLWEXRF5hj4mCGjrn ZoVxgeBWdv2yi/oCy55Sf371nwRw/8v8sFz5Y=
- In-reply-to: <110106092447.ZM20931@xxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTinw=XEV+CA1wuMcNEpdXb--A2e42QcCf_TdbKYg@xxxxxxxxxxxxxx> <110106084111.ZM20766@xxxxxxxxxxxxxxxxxxxxxx> <110106092447.ZM20931@xxxxxxxxxxxxxxxxxxxxxx>
On 6 January 2011 18:24, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 6, Â8:41am, Bart Schaefer wrote:
>>
>> > ls dir<tab> #works
>> > du dir<tab> #nothing
>>
>> This is a bug in _du, it's returning a 0 status without ever adding any
>> matches, which causes _dispatch in turn to report success to _complete
>> which then skips running the matcher-list.
>>
>> This in turn is because _du checks for a state transition to handle the
>> --time and --time-style options, and that case statement masks the
>> return value from _arguments.
>
> Incidentally, the way I approach debugging this stuff (especially when
> there's one working and one non-working example as above) is to use
> the _complete-debug binding (^X?) to get a temp file xtrace dump of
> each of the different cases, and then diff them to look for places
> where the flow of control may be going awry.
>
> In the examples above, _complete went on to line 64 after _ls was
> finished, but exited at line 63 for _du, which made it obvious that
> _du was returning 0 even though it hadn't done anything.
Thanks for the fix and the tip, I see also that I was probably the one
to break _du since I added those options, but I had no idea the return
value was even used by the completion system.
I guess I'll have a go at fixing _mkdir then...
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author