From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11731 invoked by alias); 23 Sep 2015 08:59:09 -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: 20629 Received: (qmail 14775 invoked from network); 23 Sep 2015 08:59:07 -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-AuditID: cbfec7f5-f794b6d000001495-34-5602677b5a90 Date: Wed, 23 Sep 2015 09:48:21 +0100 From: Peter Stephenson To: Zsh Users Subject: Re: Dynamic directory name function Message-id: <20150923094821.5c5d0b80@pwslap01u.europe.root.pri> In-reply-to: <150922210756.ZM30253@torch.brasslantern.com> References: <20150922204251.05f3d291@ntlworld.com> <150922210756.ZM30253@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xq7rV6UxhBhsPKlrsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGb8XLGYs6OasuH9nNmMD4zz2LkYODgkBE4lPj2W6GDmBTDGJ C/fWs3UxcnEICSxllOjf8YkRwpnGJDHl4w8WCGcbo8SNVTsZQVpYBFQlPp+dxQxiswkYSkzd NBssLiKgKHHm1zcmEFtYQEeiY+dzVhCbV8Be4seFXrB6TgEriebJG8DiQgJJEt+unASr5xfQ l7j69xMTxEn2EjOvnGGE6BWU+DH5HguIzSygJbF5WxMrhC0vsXnNW2aIOeoSN+7uZp/AKDQL ScssJC2zkLQsYGRexSiaWppcUJyUnmukV5yYW1yal66XnJ+7iREStF93MC49ZnWIUYCDUYmH 1+I7Y5gQa2JZcWXuIUYJDmYlEd6nAUxhQrwpiZVVqUX58UWlOanFhxilOViUxHln7nofIiSQ nliSmp2aWpBaBJNl4uCUamBU26dzI/razBlmL5/e3sTTf3q7xnbWZesXM964J3hOUPzJoSa1 0Fcfbwkcfr/i26NNi/dpH1/KsvDeHskZ3T1rL0nv3hVas/fmk6sedxfcWxt6utqvroTL62zp 9naOmkiF6UkZWRaeWUzzlv9oeJ9QVTnhdmiNgGJykPAKzZkuxo+3v2T78DykX4mlOCPRUIu5 qDgRAJsUDrpWAgAA On Tue, 22 Sep 2015 21:07:56 -0700 Bart Schaefer wrote: > 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. I did think about that. But having written the wrapper function, with the variables the way they are, everything immediately fell out neatly and clearly with associative arrays having a natural meaning. zstyle would just obscure the way the hierarchy was linked for no real gain --- quite possibly to the point where I couldn't remember how to do it even myself and wouldn't actually use it, in which case the whole thing would be a waste of time. (I can never remember how the more complicated styles work in completion.) But maybe you can come up with an example of how you'd set styles that shows it working neatly and obviously. pws