Trepan-Debuggers / zshdb

gdb-like "trepan" debugger for zsh
GNU General Public License v3.0
295 stars 23 forks source link

Prompt after subshell exit #60

Closed rocky closed 10 months ago

rocky commented 10 months ago

Track debugger command number through subshells by saving the debug command number.

Note that the test has something weird where commands are not showing up in output which is why we go from debug command 5 to 8 (6 and 7 prompts and output are not appearing).

jansorg commented 10 months ago

Thanks, that's surprisingly more easy to fix than I though! When I created the test, I noticed that the prompt was never printed to the output, that's why I added eval? echo \$_Dbg_prompt to emulate the prompt output. I assumed that the prompt isn't printed because commands are read from a file, but wasn't sure about it.

jansorg commented 10 months ago

I just tested your PR and it's working nicely.

rocky commented 10 months ago

Thanks for checking. I'll merge this then, and then look at what is up with the missing prompts as a separate issue.

In an interactive session, these do appear. So it is something weird is going on when commands are run through a batch file.