On Sat, Jun 18, 2016 at 2:26 AM, Duy Nguyen <pclouds@xxxxxxxxx> wrote: > On Sat, Jun 18, 2016 at 6:17 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: >> >>> v6 fixes comments from Ramsay and Eric. Interdiff below. >> >> Another thing I noticed with this is that the non-ascii test breaks >> when run under dash (but passes under bash). You need to have is_IS >> locale on the system to see the breakage, it seems (which is why I >> didn't see it so far). > > Is it a special version, maybe from debian? It works for me on gentoo. > >> ~/w/git/temp/t $ equery --quiet list dash > app-shells/dash-0.5.8.2 >> ~/w/git/temp/t $ dash ./t7812-grep-icase-non-ascii.sh > # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale > # lib-gettext: Found 'is_IS.iso88591' as an is_IS ISO-8859-1 locale > ok 1 - setup > ok 2 - grep literal string, no -F > ok 3 - grep pcre utf-8 icase > ok 4 - grep pcre utf-8 string with "+" > ok 5 - grep literal string, with -F > ok 6 - grep string with regex, with -F > ok 7 - pickaxe -i on non-ascii > # passed all 7 test(s) > 1..7 Can any shell wizards explain this to me? With this code BS=\\ echo ${BS}${BS} Debian's dash returns a single backslash while bash returns two backslashes. Section 2.2.1 [1] does not say anything about one backslash (hidden behind a variable!) after escaping the following one and still eats the one after that.. [1] http://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html