Closed alxbl closed 4 years ago
Thanks for porting!
I think standalone is nicer, but I wonder if we should a) be exporting LAST_STATUS, or b) simply setting ?
to what it should be afterwards? If its not too much trouble to have it be a separate function like geometry_exitcode
that would be awesome, otherwise I will just merge this.
I pulled the GEOMETRY_LAST_STATUS
into the precmd hook, which was necessary for it to be readable while building the RPROMPT. I also made exit code into its own function as you said. This way it can be put on either side, and will use GEOMETRY_SEPARATOR
.
This should be the most modular approach. I'll update the doc in a few minutes.
Cheers, Alex
One last thing, If you have an idea for a good symbol for the exit code (I was thinking unicode cross?), I can also add the symbol for it.
I tried to rebase this on the latest mnml but had a lot of trouble, so I ended up merging. Conflicts should be fixed. Feel free to squash merge.
Merged it in, thanks for the contribution!
As requested, I've ported this to the
mnml
branch. After looking at thestatus
function, I figured that it made a lot of sense to have this as an option of status, so I added a configuration to show exit status.If you'd prefer this to be a standalone function (to make it possible to have it in RPROMPT or INFO instead, let me know.