bug-bash
[Top][All Lists]
Advanced

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

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"


From: Koichi Murase
Subject: Re: bash "extglob" needs to upgrade at least like zsh "kshglob"
Date: Sat, 19 Nov 2022 08:48:17 +0900

2022年11月18日(金) 2:11 Chet Ramey <chet.ramey@case.edu>:
> "If a pattern ends with an unescaped <backslash>, it is unspecified whether
> the pattern does not match anything or the pattern is treated as invalid."
>
> Bash uses the former interpretation. If "the pattern is treated as invalid"
> means trying to literally match the open bracket and going on from there,
> your interpretation is valid as well. The standard doesn't use that
> language in other places it specifies to treat the bracket as an ordinary
> character to be matched literally, however.

Thank you for the explanation. I haven't been considering the
consistency with the treatment of the slashes outside the bracket
expression. I think I need to adjust the treatment of the slash in my
new engine by introducing e.g. a special flag for <not matching
anything>. Thank you.

--
Koichi



reply via email to

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