From owner-cvs-src-old@FreeBSD.ORG Thu Jun 9 23:13:51 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6F32106566B for ; Thu, 9 Jun 2011 23:13:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D4C728FC0A for ; Thu, 9 Jun 2011 23:13:51 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p59NDpQD082472 for ; Thu, 9 Jun 2011 23:13:51 GMT (envelope-from jilles@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p59NDpvs082471 for cvs-src-old@freebsd.org; Thu, 9 Jun 2011 23:13:51 GMT (envelope-from jilles@repoman.freebsd.org) Message-Id: <201106092313.p59NDpvs082471@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jilles@repoman.freebsd.org using -f From: Jilles Tjoelker Date: Thu, 9 Jun 2011 23:12:23 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/sh eval.c expand.c parser.c parser.h sh.1 src/tools/regression/bin/sh/execution set-x3.0 X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2011 23:13:52 -0000 jilles 2011-06-09 23:12:23 UTC FreeBSD src repository Modified files: bin/sh eval.c expand.c parser.c parser.h sh.1 Added files: tools/regression/bin/sh/execution set-x3.0 Log: SVN rev 222907 on 2011-06-09 23:12:23Z by jilles sh: Do parameter expansion before printing PS4 (set -x). The function name expandstr() and the general idea of doing this kind of expansion by treating the text as a here document without end marker is from dash. All variants of parameter expansion and arithmetic expansion also work (the latter is not required by POSIX but it does not take extra code and many other shells also allow it). Command substitution is prevented because I think it causes too much code to be re-entered (for example creating an unbounded recursion of trace lines). Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would be quite useful. Revision Changes Path 1.108 +3 -2 src/bin/sh/eval.c 1.87 +1 -0 src/bin/sh/expand.c 1.113 +44 -0 src/bin/sh/parser.c 1.18 +1 -0 src/bin/sh/parser.h 1.166 +2 -2 src/bin/sh/sh.1 1.1 +9 -0 src/tools/regression/bin/sh/execution/set-x3.0 (new)