Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: preexec sometimes gets wrong command



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