From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13682 invoked by alias); 11 Jun 2015 15:46:08 -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: 35445 Received: (qmail 24246 invoked from network); 11 Jun 2015 15:46:06 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=VxGmTWH6pAx3T8u1HipViTl9ulkS07UkVF2L9OC7yuY=; b=g/xQ6G6PonF7vrxh2MWfj/ZBbgQ94DnIQSjm91EUxW0vjUnZ12Tj6/4ssGt29pdmf9 HRD8wd44gc9+WTyNCpcN2bR1M9hmHvDtKL+MX3JT9gzzfV+vAC/tfbLFidaj3sx/4paX AR8epbgr6vMBmO6xi0kFLX/8xL4FCAYmuPbQXQe7ewm9f2PXuvNVFEEDOWlcMuAeK9ky 6zDX5GhcoU6KRZu8eyTHTQ8nHIEjAEolzLqOEhCIDsueiH1sjUijQxjL5pIAo4WoRIYt TlEwkPOz0GMWwWr1hLRc6AS0G1941D6dqPh8ndDebxKwDzLxDYepXj83OeQfp5eMzBlN aSrw== X-Gm-Message-State: ALoCoQlx6gIkNtRlw5qx+87Kb2x5mYSN9h9nfROq5Ss/L+A93Kl9DFmgwJAlTobvJGYncW+mv448 X-Received: by 10.202.87.4 with SMTP id l4mr7915601oib.86.1434037562496; Thu, 11 Jun 2015 08:46:02 -0700 (PDT) From: Bart Schaefer Message-Id: <150611084558.ZM32001@torch.brasslantern.com> Date: Thu, 11 Jun 2015 08:45:58 -0700 In-Reply-To: <16400.1434024577@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "bug with hidden prefixes" (Jun 11, 2:09pm) References: <18592.1433197179@thecus.kiddle.eu> <16400.1434024577@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: bug with hidden prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 11, 2:09pm, Oliver Kiddle wrote: } } _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. Hmm. When I use this with "compadd three" removed, I get exactly the same behavior as with it included: torch% _foo() { local ret=1 compadd -p /dev/ -M 'r:|/=** r:|=*' one two && ret=0 : compadd three && ret=0 return ret } torch% foo /d one two That is, no prefix is inserted, just the possible matches are listed. The only way I get different behavior is to remove the -M spec. torch% _foo() { local ret=1 compadd -p /dev/ one two && ret=0 compadd three && ret=0 return ret } torch% foo /d torch% foo /dev/ I have no additional clues but perhaps this rules out some red herrings.