From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27848 invoked from network); 20 Jul 2001 17:59:13 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Jul 2001 17:59:13 -0000 Received: (qmail 4736 invoked by alias); 20 Jul 2001 17:59:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15435 Received: (qmail 4725 invoked from network); 20 Jul 2001 17:59:04 -0000 From: "Bart Schaefer" Message-Id: <1010720175634.ZM7406@candle.brasslantern.com> Date: Fri, 20 Jul 2001 17:56:33 +0000 In-Reply-To: <20010720192942.A15962@silmu.st.jyu.fi> Comments: In reply to Juhapekka Tolvanen "bug in preexec()" (Jul 20, 7:29pm) References: <20010720192942.A15962@silmu.st.jyu.fi> X-Mailer: Z-Mail (5.0.0 30July97) To: Juhapekka Tolvanen , zsh-workers@sunsite.dk Subject: Re: bug in preexec() MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 20, 7:29pm, Juhapekka Tolvanen wrote: } Subject: bug in preexec() } } If I give some command, for example this: } } ls ; sleep 200 } } My titlebar shows that command three times and last two are kind } of distorted The format of arguments to preexec changed between 3.1.9 and 4.0.1. Previously it received only a single argument as $1, so $1 and $* were interchangable. Now it receives three arguments; to get the previous behavior, you need to be sure you're referring only to $1. The doc says: [...] 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 that is being executed. That second argument is (intentionally) the same thing you'd see from the "jobs" command if the command were backgrounded. -- 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