From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26032 invoked by alias); 23 Sep 2015 04:08:01 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20626 Received: (qmail 19463 invoked from network); 23 Sep 2015 04:08:00 -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=-1.9 required=5.0 tests=BAYES_00 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=UCR4aB3bQf9IWX8fGz7bSqvSVX0qAg3yUdz+dgAbHPc=; b=KPeOcmeoaXFDjAiMBwePC/Rm1TilsYOBNFEyAQMfn0wm21zQKGVsnVne1WHOBNSCN4 h9zk5OeE4tlALqlJAvoR2frt/1YdcxmbewdFCdwmlOMOWWxYDatRbZao4OwQ5y7uweqn iNupzRvIGd2go5o+Awl1BSNlxpyfQzy1o26UtPx67Hsd2q9f6HJLCYev9sRFg84MwSvT iEv5/eoIIg6lcFpqvNWfmfVdFwq5nwuLVpc2sH4bd7ZSPNDC4I7p4UDBhRdTl5MyJC0p lOIOdLlhJ/0lr88op2CNVWfp6wcAynfLcaDK016NZWAAbYClDGwNg21QcF/4rxWbLQya I8uw== X-Gm-Message-State: ALoCoQm3kT47+xzA82Lbj+FiA/EaWGAbU9CktHxwYujn19BWvXpyNvQsrs9RdOE5LqBLrhk00lNw X-Received: by 10.182.165.99 with SMTP id yx3mr18330504obb.55.1442981278322; Tue, 22 Sep 2015 21:07:58 -0700 (PDT) From: Bart Schaefer Message-Id: <150922210756.ZM30253@torch.brasslantern.com> Date: Tue, 22 Sep 2015 21:07:56 -0700 In-Reply-To: <20150922204251.05f3d291@ntlworld.com> Comments: In reply to Peter Stephenson "Dynamic directory name function" (Sep 22, 8:42pm) References: <20150922204251.05f3d291@ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Dynamic directory name function MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 22, 8:42pm, Peter Stephenson wrote: } Subject: Dynamic directory name function } } For almost as long I've been meaning to turn this into a generic } function that you can configure just with a few variables. I've finally } done that, and this has allowed me to add the completion support that } was missing before. I have one immediate suggestion: Use zstyle instead of variables. Look them up in the context of the wrapper function name (with some prefix to disambiguate from other zstyle uses). Remember that there's nothing in the zstyle builtin that requires you to use colon-separated context names or wildcards. Places where you currently use e.g. _zdn_assoc=(${(Pkv)_zdn_var}) become zstyle -a ZDN_${0} zdn_var _zdn_assoc or the like; it becomes possible to define multiple wrapper functions if for some reason that's useful. Thoughts?