From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13984 invoked by alias); 11 Jun 2010 22:30:41 -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: 28027 Received: (qmail 8878 invoked from network); 11 Jun 2010 22:30:29 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.43 as permitted sender) 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; bh=ieHQDsrZDE/RFgF4v3ZiLyOpBX7FDy4ktwkOuK7GwiQ=; b=DNO5HQ2SQTrkYZQXrdwqEVaweHaJos197z7yIUOGJYM5lfOS8J967DKNCgAx9oDXkd DDFnGd3pZOPyIm93zs7hj8eUlrDPhle0QU4K8JdmiXOpTrglNOQatyEPAVPGwAE7v/Jk na0u3Pk4pBABYy8HtuJ47KoY1z9jzTOfsWhdM= 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; b=D0blPVwSxKBSqhr0FSKNZBLNQKM57SuEDEE+M+WbivUmTuteOA2DLSHuSa/kSsRPUJ OrEOx4GSO/GpW6PpyGxsiBP3OSZ7gKemUlxI1DFSWtsnHQ/+xFrQiB0MPjeUfvtr5cwK 0Y2AHruzAEIElc9xYR+IsyvGh6n/msiLUaV+M= MIME-Version: 1.0 In-Reply-To: <8073.1276294725@pws-pc> References: <8073.1276294725@pws-pc> Date: Sat, 12 Jun 2010 00:30:24 +0200 Message-ID: Subject: Re: PATCH: dynamic directory name completion From: Mikael Magnusson To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 12 June 2010 00:18, Peter Stephenson wrote: > I've been playing around with dynamic directory names for referring to > recently used directories and in the process realised that rather than > having to overload _dynamic_directory_name in order to complete dynamic > directory names it would be much more natural to call the original > function, zsh_directory_name, with a new code letter. You don't lose > anything at all by this---you can still overload _dynamic_directory_name > if you prefer. > > Here's the change with a tested (but rather less useful than the code > I'm aiming at) example. > > Index: Doc/Zsh/expn.yo > =================================================================== > RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v > retrieving revision 1.115 > diff -p -u -r1.115 expn.yo > --- Doc/Zsh/expn.yo 11 Jun 2010 20:08:02 -0000 1.115 > +++ Doc/Zsh/expn.yo 11 Jun 2010 22:12:37 -0000 > @@ -1451,6 +1451,12 @@ parts of the directory path, as describe > length matched (16 in the example) is longer than that matched by any > static name. > > +The completion system calls `tt(zsh_directory_name c)' in order to > +completion dynamic names for directories. The code for this should be completion -> complete