From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27600 invoked from network); 27 Oct 1998 05:16:32 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 27 Oct 1998 05:16:32 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id AAA04033; Tue, 27 Oct 1998 00:09:59 -0500 (EST) Resent-Date: Tue, 27 Oct 1998 00:09:59 -0500 (EST) Message-Id: <199810270513.XAA19217@hzoli.home> Subject: Re: Docs fix In-Reply-To: <981026202123.ZM12435@candle.brasslantern.com> from Bart Schaefer at "Oct 26, 98 08:21:23 pm" To: zsh-workers@math.gatech.edu (Zsh hacking and development) Date: Mon, 26 Oct 1998 23:13:47 -0600 (CST) From: Zoltan Hidvegi X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"WPB3L2.0.y-.dMLDs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4459 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Wow, I did not expect to stir such a debate. > The context here is the question about converting csh aliases to zsh. Sure, and you are absolutely right in that \!* corresponds to $*. And there are certainly legitime cases where you would realy want to use $*. But the examples in the FAQ are not such cases: cd() { builtin cd $*; echo $PWD; } rm() { command rm -i $* } l() { /bin/ls -la $* | more } In all these cases you really want to use "$@". Especially in case of cd, I often use the two argument cd with empty second argument. There is a good example in the FAQ where $* is the right thing: xhead () { print -n "\033]2;$*\a"; } And one more point, people misuse csh's \!* as often as they do misuse $*. > alias do "\!* >&! did &" > alias dopr '\!* | lpr -J "\!:1"' > > If you replace $* with "$@" when converting those aliases, you end up > quoting the word in the command position, which causes unexptected side > effects. This really does not have any relevance to this discussion, but what are those side effects? Alias expansion and reserved word recognition is not done on the result of either $* or "$@" expansion. The exact conversion of these csh aliases would be rather tricky. Zoli