summaryrefslogtreecommitdiffstats
path: root/format.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-02-09 16:01:18 +0000
committerThomas Adam <thomas@xteddy.org>2021-02-09 16:01:18 +0000
commitc6215b55e05daefa47a987b820d0dd301b1c6301 (patch)
treedf76e6e6d97a9081d589fe806c875a8212b1be90 /format.c
parent8d7f341a858d4725c787f32e3fb08ea36f8db75d (diff)
parent1492ae11a5c4f29e783f1d49f3580ee7f4d276e4 (diff)
Merge branch 'obsd-master' into master
Diffstat (limited to 'format.c')
-rw-r--r--format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/format.c b/format.c
index de11fc8b..cf82b478 100644
--- a/format.c
+++ b/format.c
@@ -367,7 +367,10 @@ format_job_get(struct format_expand_state *es, const char *cmd)
RB_INSERT(format_job_tree, jobs, fj);
}
- expanded = format_expand1(es, cmd);
+ format_copy_state(&next, es, FORMAT_EXPAND_NOJOBS);
+ next.flags &= ~FORMAT_EXPAND_TIME;
+
+ expanded = format_expand1(&next, cmd);
if (fj->expanded == NULL || strcmp(expanded, fj->expanded) != 0) {
free((void *)fj->expanded);
fj->expanded = xstrdup(expanded);
@@ -393,7 +396,6 @@ format_job_get(struct format_expand_state *es, const char *cmd)
if (ft->flags & FORMAT_STATUS)
fj->status = 1;
- format_copy_state(&next, es, FORMAT_EXPAND_NOJOBS);
return (format_expand1(&next, fj->out));
}