From: nicm Date: Fri, 29 May 2015 23:26:52 +0000 (+0000) Subject: Don't use special strings if #() commands fail, just remove the format X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=55fe9c670149cb9248bfe1d944904f2157400c36;p=openbsd Don't use special strings if #() commands fail, just remove the format (as if the command produced nothing). Makes constructions that can fail like '#(test whatever && echo foo)' work as they did before. --- diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 9a8be293442..6459e96280b 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.69 2015/05/29 23:12:38 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.70 2015/05/29 23:26:52 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -175,17 +175,6 @@ format_job_callback(struct job *job) fj->job = NULL; free(fj->out); - if (WIFEXITED(job->status) && WEXITSTATUS(job->status) != 0) { - xasprintf(&fj->out, "<'%s' exited with %d>", fj->cmd, - WEXITSTATUS(job->status)); - return; - } - if (WIFSIGNALED(job->status)) { - xasprintf(&fj->out, "<'%s' got signal %d>", fj->cmd, - WTERMSIG(job->status)); - return; - } - buf = NULL; if ((line = evbuffer_readline(job->event->input)) == NULL) { len = EVBUFFER_LENGTH(job->event->input);