bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hidden directories breaks path expansions


From: Chet Ramey
Subject: Re: Hidden directories breaks path expansions
Date: Fri, 8 Mar 2019 09:53:39 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3

On 3/7/19 9:42 AM, Dr. Werner Fink wrote:

>> There is a slightly updated version of that patch attached to this message.
> 
> OK ... the hidden directories do work now ... but in the test suite
> of sed the test case sed-4.7/testsuite/subst-mb-incomplete.sh with
> 
>  print_ver_ sed
> 
>  require_en_utf8_locale_
> 
>  echo > in || framework_failure_
>  printf '\233\375\200\n' > exp-out || framework_failure_
> 
>  LC_ALL=en_US.utf8 sed $(printf 's/^/\\L\233\375\\\200/') in > out 2> err
> 
>  compare exp-out out || fail=1
>  compare /dev/null err || fail=1
> 
>  Exit $fail
> 
> does fail (YaOB).

I've attached an updated version of the patch. It will fix this. The glob
engine shouldn't return a dequoted version of the pattern unless it
matches something (and, based on historical behavior, maybe not even then).

Ironically, we're about to start another discussion on the POSIX mailing
list about how backslashes in shell patterns should behave. It's always
fun to shoot at a moving target.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

Attachment: 003-globpat-backslashes
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]