Closed arkocal closed 9 years ago
Confirmed.
Seems like this is not a GUI issue (at least not caused by anything GUI related). Moving the cursor over the dot also creates the popup with the last error code. I guess this is related to lines 391 and 396 in TerminalOutput.vala
last_command = stream_element.get_text_parameter(0, "");
var return_code = stream_element.get_numeric_parameter(0, 0);
Both return the correct values for latest executed command.
Yes, the problem is actually on the shell level, because bash itself does not reset the the value of $?
until another command is executed.
This was a much deeper issue than originally suspected. Here's the full story:
__vte_prompt_command
function in the PROMPT_COMMAND
variable. Because the preexec script was appending to rather than overriding this variable, the built-in check for no-op lines did not work.Basically, one bug was hiding another bug. Now, both bugs are fixed.
Steps to reproduce: Give a command that returns an error code. Press enter.
It works correctly again after a command executes successfully.