0521d315a4
- remove libeditline dependency again as libeditline lives in /usr - update to version 0.5.7 - optimize dash -c "command" to avoid a fork - improve LINENO support - dotcmd should exit with zero when doing nothing - replace GPL noclobberopen code with the FreeBSD version - do not split the result of tilde expansion - use exit status 127 when the script to run does not exist - document optional open parenthesis for case patterns - use faccessat if available - added dash-0.5.7-do-not-close-stderr.patch in order to prevent stderr from being closed when /dev/tty fails to open (backported from upstream git) - added dash-remove-backslash-before-in-double-quotes-in-variable.patch which removes a backslash before } in double-quotes in variable as it prevents the closing brace from terminating the substitution (from FreeBSD/Debian) - Remove redundant tags/sections from specfile (cf. packaging guidelines) OBS-URL: https://build.opensuse.org/request/show/86994 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dash?expand=0&rev=8
38 lines
1.0 KiB
Diff
38 lines
1.0 KiB
Diff
From 1ed728ca0ea91cac348e1baf070399df5d575115 Mon Sep 17 00:00:00 2001
|
|
From: Jilles Tjoelker <jilles@stack.nl>
|
|
Date: Sun, 21 Nov 2010 14:42:22 +0100
|
|
Subject: [PARSER] Remove backslash before } in double-quotes in variable
|
|
|
|
The backslash prevents the closing brace from terminating the
|
|
substitution, therefore it should be removed.
|
|
|
|
FreeBSD sh test expansion/plus-minus2.0 starts working, no other tests
|
|
are affected.
|
|
|
|
Example:
|
|
printf "%s\n" ${$+\}} ${$+"\}"} "${$+\}}"
|
|
should print } three times, without backslashes.
|
|
|
|
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
|
|
---
|
|
src/parser.c | 3 +++
|
|
1 files changed, 3 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/src/parser.c b/src/parser.c
|
|
index 6de27629..4fa8c6d4 100644
|
|
--- a/src/parser.c
|
|
+++ b/src/parser.c
|
|
@@ -926,6 +926,9 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
|
|
c != '$' && (
|
|
c != '"' ||
|
|
eofmark != NULL
|
|
+ ) && (
|
|
+ c != '}' ||
|
|
+ varnest == 0
|
|
)
|
|
) {
|
|
USTPUTC('\\', out);
|
|
--
|
|
1.7.6
|
|
|