On 5/18/17 2:29 AM, Zoltán Herczeg wrote:
>> I read this as saying that it's a requirement on the application to ensure
>> that character classes are correctly formed, and it's unspecified behavior
>> if they're not.
>>
>> So you're right: people should not count on shells treating improperly-
>> f
On Thu, May 18, 2017 at 08:29:13AM +0200, Zoltán Herczeg wrote:
> I think throwing an error would be better than an undefined behaviour. Bash
> throws error for solo parenthesis, a similar technique could be used here.
That's not really an option, because an unmatched [ isn't a syntax
error. It'
>I read this as saying that it's a requirement on the application to ensure
>that character classes are correctly formed, and it's unspecified behavior
>if they're not.
>
>So you're right: people should not count on shells treating improperly-
>formed character classes as literal characters.
Thank
On 5/17/17 10:52 AM, Eduardo Bustamante wrote:
> Then in "9.3.5 RE Bracket Expression"
> (http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/V1_chap09.html#tag_09_03_05),
>
> The character sequences "[." , "[=" , and "[:" (
> followed by a , , or ) shall be special insi
On Tue, May 16, 2017 at 2:36 PM, Zoltán Herczeg wrote:
[...]
> bash version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
> This command hangs in any directory on my machine (I don't have a directory
> without a dot file):
>
> ls @(@()).
Yeah, I can reproduce the problem with bash 4
Hi,
bash version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
This command hangs in any directory on my machine (I don't have a directory
without a dot file):
ls @(@()).
>> The shell globbing library seems to be interpreting this pattern
>> weirdly. I don't know the answer for thi
The '[:' may be messing with it, 'a[[:alpha:]:abm[]' should work. It won't
match 'amm' because the range only matches a single character, you'd need
'a+([[:alpha:]:abm[])'
On Tue, May 16, 2017 at 10:49 AM, Eduardo Bustamante
wrote:
> On Tue, May 16, 2017 at 2:48 AM, Zoltán Herczeg
> wrote:
> >
On Tue, May 16, 2017 at 2:48 AM, Zoltán Herczeg wrote:
> Hi,
>
> bash enter an infinite loop for this glob:
>
> ls @(@()).
It works fine for me. What version of Bash are you using? And, what
files are in the directory you're testing in?
dualbus@debian:~/t$ ls
a.1 a.2 a.3 a.4 b.1 b.2 b.3 b
Hi,
bash enter an infinite loop for this glob:
ls @(@()).
I have been trying to create a bash glob regex converter. It would be great if
somebody (privately) could explain me how !() and invalid [] expressions
exactly work. I have questions such as:
ls a[[:alpha:][:abm]
Why does this match