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

problem with push-line-or-edit and precmd?



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



Messages sorted by: Reverse Date, Date, Thread, Author