Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: preexec sometimes gets wrong command
- X-seq: zsh-workers 13937
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: preexec sometimes gets wrong command
- Date: Tue, 10 Apr 2001 07:59:09 +0000
- In-reply-to: <Pine.LNX.4.30.0104091157140.28864-200000@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.30.0104091157140.28864-200000@xxxxxxxxxxxxxxx>
On Apr 9, 1:03pm, Wayne Davison wrote:
}
} I just noticed that preexec gets passed the wrong command when the
} current command is discarded from the history [...] so I decided to
} set the first parameter to an empty string when this happens. Perhaps
} a better solution would be to pass the current (expanded) command
} string?
I think the empty string is the right thing; the docs say "If the history
mechanism is active, ..." and using a leading space etc. is explicitly a
way to deactivate history for this command.
I'd actually vote for:
$1 the history line, or empty
$2 getjobtext(), or empty (is it ever?)
$3 getpermtext() (what your patch passes as $2)
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author