zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Joshua Symons <vmcore@mysun.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Preexec & Printf
Date: Thu, 25 Apr 2002 18:45:52 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0204251839160.7967-100000@ns1.sodaware.com> (raw)
In-Reply-To: <254cf203d4.203d4254cf@mysun.com>

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}.


  reply	other threads:[~2002-04-26  1:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26  1:25 Joshua Symons
2002-04-26  1:45 ` Bart Schaefer [this message]
2002-04-26  9:21   ` Oliver Kiddle
  -- strict thread matches above, loose matches on Subject: below --
2002-04-26  2:10 Joshua Symons
2002-04-26  1:54 Joshua Symons
2002-04-26  2:06 ` Bart Schaefer
2002-04-26  1:31 Joshua Symons
2002-04-26  1:47 ` Geoff Wing
2002-04-26  1:07 Joshua Symons
2002-04-26  1:16 ` Bart Schaefer
2002-04-26  1:19   ` Bart Schaefer
2002-04-26  0:47 Joshua Symons
2002-04-26  1:01 ` Bart Schaefer
2002-04-26  1:22 ` Geoff Wing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0204251839160.7967-100000@ns1.sodaware.com \
    --to=schaefer@brasslantern.com \
    --cc=vmcore@mysun.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).