From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6714 invoked by alias); 6 Jan 2011 17:25:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28580 Received: (qmail 17584 invoked from network); 6 Jan 2011 17:25:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110106092447.ZM20931@torch.brasslantern.com> Date: Thu, 06 Jan 2011 09:24:46 -0800 In-reply-to: <110106084111.ZM20766@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: matcher-list doesn't work with some completers?" (Jan 6, 8:41am) References: <110106084111.ZM20766@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: matcher-list doesn't work with some completers? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 6, 8:41am, Bart Schaefer wrote: > > > ls dir #works > > du dir #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. --