zsh-workers
 help / color / mirror / code / Atom feed
* problem with push-line-or-edit and precmd?
@ 2009-01-16 22:21 Greg Klanderman
  2009-01-17  4:08 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Klanderman @ 2009-01-16 22:21 UTC (permalink / raw)
  To: Zsh list


Hi,

I just noticed this while testing a patch to add a special
zle-line-finish widget, and thought it was due to my changes
but have now found the same behavior in pristine 4.3.9 and
4.2.5 builds.

Running "zsh -f",

lwm% function foo () { return $1 }
lwm% function precmd () { local x=$? ; (( $x != 0 )) && echo "=> exit status $x" }
lwm% foo 4
=> exit status 4
lwm% true
lwm% 
lwm% echo '                       ## type: <return>
quote>                            ## type: ESC-x push-line-or-edit <return>
=> exit status 1
lwm% echo '

Notice the precmd is run when the push-line-or-edit widget is invoked,
and that $? is set to 1 in the precmd.

Is it expected that precmd would be run here?

And if so, why is a non-zero exit status set?

thanks,
Greg


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-17 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 22:21 problem with push-line-or-edit and precmd? Greg Klanderman
2009-01-17  4:08 ` Bart Schaefer
2009-01-17  6:39   ` Greg Klanderman
2009-01-17 19:06     ` Bart Schaefer

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