From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3055 invoked from network); 26 Feb 2001 16:54:32 -0000 Received: from unknown (HELO sunsite.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Feb 2001 16:54:32 -0000 Received: (qmail 15010 invoked by alias); 26 Feb 2001 16:54:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13540 Received: (qmail 14994 invoked from network); 26 Feb 2001 16:54:18 -0000 From: "Bart Schaefer" Message-Id: <1010226165134.ZM5059@candle.brasslantern.com> Date: Mon, 26 Feb 2001 16:51:34 +0000 In-Reply-To: <1010226072557.ZM4551@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Global aliases, eval, and completion (Re: Expanding interactively aliases)" (Feb 26, 7:25am) References: <200102210819.JAA17470@beta.informatik.hu-berlin.de> <1010226072557.ZM4551@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Global aliases, eval, and completion (Re: Expanding interactively aliases) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 26, 7:25am, Bart Schaefer wrote: } } } > My real point is that the existing _expand appears to be expanding } } > global aliases already. [...] A quick check reveals that this is } } > with the substitute style and is due to the fact that the aliases } } > are expanded within eval. } } } } Now that you say that... I seem to have a very faint memory of a } } discussion about this (not in _expand, I think, we had the problem } } somewhere else). I think we found a solution which I can't think of } } now and I don't know where to search for it either. I was just diffing some backup copies I'd made of things like minor changes to _arguments against the current sources, and I found the solution I think you're thinking about. } [...] _arguments does things like } } eval ws\=\( "${action[2,-2]}" \) } and } eval "action=( $action )" } } There are a number of other completion functions that use eval for similar } purposes. We can replace all `eval's of that particular form with set -A ws ${=~action[2,-2]} or set -A action ${=~action} etc., which also gives us liberty to remove the wordsplitting or globbing when appropriate (I think wordsplitting always is, but globbing might better be left off in a few cases). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net