halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
460 stars 85 forks source link

Return with previous exit code in Bash prompt function #199

Closed jenbroek closed 1 year ago

jenbroek commented 1 year ago

asdf-java prepends to $PROMPT_COMMAND, thus swallowing up the previous command's exit code (normally the command the user invoked). This is troublesome if the exit code is used in the user's own prompt command, for example to output a different prompt.