From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 10/10] t/t7006-pager.sh: use the $( ... ) construct for command substitution Date: Thu, 7 Jan 2016 14:51:50 +0100 Message-ID: <1452174710-28188-11-git-send-email-gitter.spiros@gmail.com> References: <1452174710-28188-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Thu Jan 07 14:52:38 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aHAzL-0002C9-Lp for gcvg-git-2@plane.gmane.org; Thu, 07 Jan 2016 14:52:28 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbcAGNwM (ORCPT ); Thu, 7 Jan 2016 08:52:12 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35363 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbcAGNwE (ORCPT ); Thu, 7 Jan 2016 08:52:04 -0500 Received: by mail-pa0-f52.google.com with SMTP id qh10so9249065pab.2 for ; Thu, 07 Jan 2016 05:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kA/mM4LCwOPwVhJ5XenpOuiKloKxZN3Z18j+rGVSpp4=; b=yR/wiYHlB6HJIwmvIBwCjwGUmzS3wImse3MFt2r1WNp1/phWCgoZjJhyuXsUGi1nZG M2olngwstBoge1PEUBvgoPXlCtEqqV3CDjYSxqWRXjGPoWWu0+2bVtFDag491qcyQtgV /Fj/G7T0uNE4pUKlJRVVhP9IBbbNcL3oqVPFRAlU3hPFFvGLBCZrUVAZ98CcjXe6nXas xC5APGH5vbrPJEhJkqpmBMXbpiE+l38mdAwRcAWvFqIbyytjyYXzy9y5PHQv1Rd5zmzg h7RvxGOCQ27JwbHm+7cbhur6VHo53NC9VgqU9swTvevFCPz86VpVfttVfLbyA9mlLcFW 1oGQ== X-Received: by 10.66.190.7 with SMTP id gm7mr92140459pac.79.1452174723704; Thu, 07 Jan 2016 05:52:03 -0800 (PST) Received: from ubuntu14.nephoscale.com (static-67.207.195.141.nephosdns.com. [67.207.195.141]) by smtp.gmail.com with ESMTPSA id kk5sm140627824pab.16.2016.01.07.05.52.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 05:52:03 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1452174710-28188-1-git-send-email-gitter.spiros@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto --- t/t7006-pager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 6ea7ac4..e4fc5c8 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -424,7 +424,7 @@ test_expect_success TTY 'command-specific pager works for external commands' ' echo "foo:initial" >expect && >actual && test_config pager.external "sed s/^/foo:/ >actual" && - test_terminal git --exec-path="`pwd`" external log --format=%s -1 && + test_terminal git --exec-path="$(pwd)" external log --format=%s -1 && test_cmp expect actual ' -- 2.3.3.GIT