t/t7006-pager.sh: use the $( ... ) construct for command substitution
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 <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jan 7, 2016 at 14:51 UTC
90ae5d27166580addfb24347e43df6809a28b5e1
1 file changed
+1
-1
t/t7006-pager.sh
+1
-1
@@ -424,7 +424,7 @@ test_expect_success TTY 'command-specific pager works for external commands' '
424
echo "foo:initial" >expect &&
425
>actual &&
426
test_config pager.external "sed s/^/foo:/ >actual" &&
427
- test_terminal git --exec-path="`pwd`" external log --format=%s -1 &&
427
+ test_terminal git --exec-path="$(pwd)" external log --format=%s -1 &&
428
test_cmp expect actual
429
'
430