1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

show current/previous job in $jobstates (3503)

This commit is contained in:
Sven Wischnowsky 2000-11-02 08:12:44 +00:00
parent 2557464cf5
commit da9b5bb81a
4 changed files with 25 additions and 12 deletions

View file

@ -1222,14 +1222,21 @@ static char *
pmjobstate(int job)
{
Process pn;
char buf[256], buf2[128], *ret, *state;
char buf[256], buf2[128], *ret, *state, *cp;
if (job == curjob)
cp = ":+";
else if (job == prevjob)
cp = ":-";
else
cp = ":";
if (jobtab[job].stat & STAT_DONE)
ret = dupstring("done");
ret = dyncat("done", cp);
else if (jobtab[job].stat & STAT_STOPPED)
ret = dupstring("suspended");
ret = dyncat("suspended", cp);
else
ret = dupstring("running");
ret = dyncat("running", cp);
for (pn = jobtab[job].procs; pn; pn = pn->next) {