summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-11-02 08:12:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-11-02 08:12:44 +0000
commitda9b5bb81a87fdbab6c74c75c904e9c4bd44f252 (patch)
treeda97783158bf15560f81887ba9f62b3206119db5 /Src/Modules
parent2557464cf55adee5d67ac683f154715854e43312 (diff)
downloadzsh-da9b5bb81a87fdbab6c74c75c904e9c4bd44f252.tar.gz
zsh-da9b5bb81a87fdbab6c74c75c904e9c4bd44f252.tar.xz
zsh-da9b5bb81a87fdbab6c74c75c904e9c4bd44f252.zip
show current/previous job in $jobstates (3503)
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/parameter.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index df4d1020e..2df362faa 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -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) {