From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18106 invoked by alias); 8 Jan 2013 10:08:47 -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: 17536 Received: (qmail 22173 invoked from network); 8 Jan 2013 10:08:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f4-b7f6d6d000001620-f3-50ebedce8fdf Date: Tue, 08 Jan 2013 09:58:37 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: completer that first expands global aliases (Re: dsf) Message-id: <20130108095837.581a79c3@pwslap01u.europe.root.pri> In-reply-to: References: 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+NgFupmluLIzCtJLcpLzFFi42I5/e/4Nd1zb18HGPyeLmSx4+RKRgdGj1UH PzAFMEZx2aSk5mSWpRbp2yVwZdw/c5i5oJGzYmnLbZYGxvnsXYycHBICJhJ3759hhrDFJC7c W8/WxcjFISSwlFGi790RZiiHSWLN1CesXYwcHCwCqhJfz7qBNLAJGEpM3TSbEcQWERCVWL5i M9hQYQFnictH97KDlPMK2Esc704HCXMKaEps3n0XbJeQgKtE940TYOX8AvoSV/9+YoK4wV5i 5pUzYCN5BQQlfky+xwJiMwtoSWze1sQKYctLbF7zlnkCo8AsJGWzkJTNQlK2gJF5FaNoamly QXFSeq6hXnFibnFpXrpecn7uJkZIAH7Zwbj4mNUhRgEORiUe3sqo1wFCrIllxZW5hxglOJiV RHjt9wGFeFMSK6tSi/Lji0pzUosPMTJxcEo1MMpO+X/C6/d/kdWMm+tDEtde5QtIPNQWvUdd j+dE8vtQLstLqqJO3Jbxkh5PGtuNn0s+qjn6dtkJMdOsTbXH9ZlmLz7+OvlPwcnMCx6WB74c OX31TKMZL+eO05uvZ/Q28GfafJ6Vt+nOuhpHq2dHHbZ/u/nRT+jKezm2qwJn5k721sjsMjE5 16PEUpyRaKjFXFScCAAvECc6HgIAAA== On Tue, 08 Jan 2013 09:41:55 +0000 (UTC) Daniel wrote: > On 2013-01-07, Daniel wrote: > > I have a nice little recent-files completer, see below. > > (found here: > > http://michael.stapelberg.de/Artikel/zsh_recent_completion ) > > > > What I would like to add to this, is for it to expand global > > aliases inline, before trying to complete (and thus ending up > > completing files in my aliased directory). > > > > I started trying to meld _generic and _expand_alias, but with my > > lack of fluency in zsh, I just made a mess :) Any help out there? > > Is there perhaps some generic way for having this done for all > > completion? A zstyle for _main_complete? I can't see a straightforward way of doing this; it looks like it needs some complicated rewriting of _expand_alias into some other function, as you were trying. It might be possible to rig up something at a higher level (probably ZLE widgets rather than completion) to call _expand_alias, ensuring it accepts the result with all expansions, then call the generic completion you want, but I haven't thought that through. pws