From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18266 invoked from network); 26 Apr 2002 01:46:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Apr 2002 01:46:16 -0000 Received: (qmail 18377 invoked by alias); 26 Apr 2002 01:46:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4877 Received: (qmail 18361 invoked from network); 26 Apr 2002 01:45:59 -0000 Date: Thu, 25 Apr 2002 18:45:52 -0700 (PDT) From: Bart Schaefer Sender: schaefer@ns1.sodaware.com To: Joshua Symons cc: zsh-users@sunsite.dk Subject: Re: Preexec & Printf In-Reply-To: <254cf203d4.203d4254cf@mysun.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 25 Apr 2002, Joshua Symons wrote: > I had seen q in the modifier list @ > http://zsh.sourceforge.net/Doc/Release/zsh_13.html#SEC45 > I don't see V and z in the modifier list, are they documented? Unfortunately that's still the 3.0 -- or perhaps it's 3.1.6 -- documentation. You need to read the docs that came with your zsh distribution if you want accurate information. > Additionally, where is the $* vs $1 documented, since I'm accustomed to > $*. The 3.1.9 doc (which I just happen to have lying around) says under the preexec function: ... If the history mechanism is active, the string to be executed is passed as an argument. Note "as AN argument", that is, the first and in this case only argument, which is $1. $* means all the arguments. In 4.0.4, this has changed: ... If the history mechanism is active (and the line was not discarded from the history buffer), the string that the user typed is passed as the first argument, otherwise it is an empty string. The actual command that will be executed (including expanded aliases) is passed in two different forms: the second argument is a single-line, size-limited version of the command (with things like function bodies elided); the third argument contains the full text what what is being executed. So in 4.0.4 if you use $* you'll get the command repeated three times, which is definitely not what you want. If you had 4.0.4, you'd probably want ${(QV)2} or maybe just ${(V)2}.