From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28494 invoked by alias); 11 Jun 2015 12:15:32 -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: 35443 Received: (qmail 24956 invoked from network); 11 Jun 2015 12:15:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1434024578; bh=d7ysW+hfMJXtmLgSI+X5cB4EUmu/wkw1f0Z2qS4Ah7A=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=E2kT8N/2VJuu6WChECe8SDnjQHUuzt0VQrE0pdzdY2Ck/blf3OAuN2pYzgqZwG6FXPdydVzJvuRMqmTlq1olpDuJZpdY0CxSTB5aUpPV+YPPX4ILdLMo5z3tZbYRT33bcHALdRPMwiVTsRt5xLtx8rDEaR6Xx/uxmVjPUtYIcTQY8ZabmOCMFrYwIAKrIZJQq5XsLGkDWyEeZdqpO1Iee8OkACHdZ5zE0LaxM0N9Kr9EgwFVom96YBiJbtowQiWXJIvMUldptD8T3UFWU9zNblOCsiR4GtvvLcKBKsgJLwm+2dQEkWuH53RTNzbdXPbyv8KvokQbTXR4TpgDCGJt+g== X-Yahoo-Newman-Id: 834581.97064.bm@smtp124.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: JCyj1O8VM1kVWhjuh1in0CRwS22ldj4AzSlAj5_v.NjexD2 QluMAdOetYFx_t96Syt6cUIkbIDhVuJl4QkuliXpkXd5pD9a0Jtid70bqj6z zPpO2vePd5HvLkvcyG9l70.iC2mJ9.d8cfpHSH_WjgfOXBi5zKRj9wWi3aKF ZK4MxE1zxa1RPUkVihkuSV94_2P6aSkOOD6Xju4DU6pg92EJVSIsFbe_V.Av mxgT7Hf4KkoPu9sUsx90W.DOoXTFjy_MqEaAKUY_d9SS4qLMMGsFbf5UrrgN g8BAAQ0gj4zjq3.EJyFkWjAV1pNLTOo3ziUGglhsC3pAAm11TC23MqfsBmtC AWIvFVVvewVeYcQGs_Y6sUtjfhl8JeiLslfD8pQq2zWibecdH8d2BKvTwV0c PE3yLzJZYxhOQtjM3UAMH9cvEJ2ksgy5s41SUataLymRTfm2IoW1KJitEVnr xtlEBl3FfJ9.Y92_59pzD_jcaUBI9uyLP6UwoAAKyu1wwZgWW9P459K9JnhL 8JWoO8gWaxgQ2eeP0Q9mPr0OCySA.pueH X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <18592.1433197179@thecus.kiddle.eu> From: Oliver Kiddle References: <18592.1433197179@thecus.kiddle.eu> To: zsh-workers@zsh.org Subject: bug with hidden prefixes MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16399.1434024577.1@thecus.kiddle.eu> Date: Thu, 11 Jun 2015 14:09:37 +0200 Message-ID: <16400.1434024577@thecus.kiddle.eu> On 2 Jun, I wrote: > This _ttys function allows the /dev/ prefix to be optional, required or > stripped. I think there's a bug somewhere in the hidden prefix handling > that this shows up, however. I'll just elaborate on this in case someone else has more success than me in tracking this down. The bug exists even in zsh 3.1.7 so is not something that got introduced later. The following are the minimal steps to reproduce it: _foo() { local ret=1 compadd -p /dev/ -M 'r:|/=* r:|=*' one two && ret=0 compadd three && ret=0 return ret } compdef _foo foo foo /d This should insert /dev/ because it is an unambiguous prefix to both possible matches: three can be ruled out. The two matches are listed, it is just that the prefix is not inserted. Without either the matching control or the third match being there, it works. Oliver