Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Fix %- (prevjob) picking wrong job after resuming



On Sun, Mar 22, 2026 at 2:10 PM Mikel Ward <mikel@xxxxxxxxxxxxx> wrote:
>
>> (!(sjn->stat & STAT_DONE)).  Is the latter a clearer expression of the
>> intent of this test?
>
> Should I resend or are you happy to make the changes?

I'm happy to make that change, but when testing -- these error
messages have become a lot less informative:

This test takes 3 seconds and hangs the shell when it fails...
--- /tmp/zsh.ztst.79176/ztst.err    2026-04-01 09:24:51
+++ /tmp/zsh.ztst.79176/ztst.terr    2026-04-01 09:24:51
@@ -1,7 +1,7 @@
 (eval):wait:1: pid 1 is not a child of this shell
-(eval):wait:3: %%: no such job
-(eval):wait:5: %+: no such job
-(eval):wait:7: %-: no such job
+(eval):wait:3: no current job
+(eval):wait:5: no current job
+(eval):wait:7: no previous job
 (eval):wait:9: %1: no such job
 (eval):wait:11: job not found: foo
 (eval):wait:13: job not found: ?bar
Test ./A05execution.ztst failed: error output differs from expected as
shown above for:
  wait 1
  echo $?
  wait %%
  echo $?
  wait %+
  echo $?
  wait %-
  echo $?
  wait %1
  echo $?
  wait %foo
  echo $?
  wait %\?bar
Was testing: 'wait' exit status and warning for unknown ID




Messages sorted by: Reverse Date, Date, Thread, Author