Closed frm closed 6 years ago
I'm not able to reproduce, but I have a pretty custom .zshrc so i'm gonna try a minimal one
I tried with a .zshrc of just source ~/.zr/plugins/geometry-zsh/geometry/geometry.zsh
and things looked fine to me
Same issue. $?
was 0
because of previous calls to echo overwriting $?
with their return values. I fixed the issue by setting a variable EXIT_VALUE=$?
at the start of geometry_plugin_render()
, and using this variable throughout the rest of the path plugin.
I wonder if this behaviour is documented by zsh And we definitely don't want to mangle $? So maybe we restore af the end?
$?
and $EXIT_VALUE
have the same value for me regardless. I don't think we are mangling it.
So you are still seeing this @fribmendes ?
Yes, but I haven't checked with default configs yet. I'm sourcing other things before geometry so maybe one of those is failing and changing the exit value.
Yeah I got this behaviour when i forgot to install lolcat and had a todo function that failed
I finally got around to investigating it.
It wasn't an issue with my zsh configs. rvm added a .zlogin
file which attempted to source it. I don't have rvm for quite some time and I don't usually make use of .zlogin
, so it took me a while to realize what was happening.
I feel kinda dumb now. Closing this.
I just need to double check if this happens with anyone else or if it is a faulty configuration of mine. Using the current
master
version of geometry, when starting up the prompt symbol uses the error exit prompt. Example:However, when I echo the contents of the
$?
variable, before the prompt is rendered, it is still0
. Since I'm running a customized geometry, is any of you able to reproduce this? @desyncr @jedahan