From owner-svn-src-head@FreeBSD.ORG Sun Nov 30 20:12:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04D516FC; Sun, 30 Nov 2014 20:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5269DDF; Sun, 30 Nov 2014 20:12:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAUKCmT4061706; Sun, 30 Nov 2014 20:12:48 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAUKCm9a061704; Sun, 30 Nov 2014 20:12:48 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201411302012.sAUKCm9a061704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 30 Nov 2014 20:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275346 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2014 20:12:49 -0000 Author: jilles Date: Sun Nov 30 20:12:47 2014 New Revision: 275346 URL: https://svnweb.freebsd.org/changeset/base/275346 Log: sh: Remove special case for '=' in set -x; always quote it in outqstr(). I plan to make set -x output always printable using $'...'; avoiding quoting words containing '=' is not worth the extra complexity. Modified: head/bin/sh/eval.c head/bin/sh/output.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Nov 30 19:32:00 2014 (r275345) +++ head/bin/sh/eval.c Sun Nov 30 20:12:47 2014 (r275346) @@ -774,15 +774,7 @@ xtracecommand(struct arglist *varlist, s for (sp = arglist->list ; sp ; sp = sp->next) { if (sep != 0) out2c(' '); - /* Disambiguate command looking like assignment. */ - if (sp == arglist->list && - strchr(sp->text, '=') != NULL && - strchr(sp->text, '\'') == NULL) { - out2c('\''); - out2str(sp->text); - out2c('\''); - } else - out2qstr(sp->text); + out2qstr(sp->text); sep = ' '; } out2c('\n'); Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Sun Nov 30 19:32:00 2014 (r275345) +++ head/bin/sh/output.c Sun Nov 30 20:12:47 2014 (r275346) @@ -122,8 +122,7 @@ outqstr(const char *p, struct output *fi outstr("''", file); return; } - /* Caller will handle '=' if necessary */ - if (p[strcspn(p, "|&;<>()$`\\\"' \t\n*?[~#")] == '\0' || + if (p[strcspn(p, "|&;<>()$`\\\"' \t\n*?[~#=")] == '\0' || strcmp(p, "[") == 0) { outstr(p, file); return;