Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14157 > unrolled thread

Re: extglob patterns not expanded in -c command-strings

Started byPaulo Marcel Coelho Aragão <marcelpaulo@gmail.com>
First post2018-05-27 22:42 -0300
Last post2018-05-27 22:42 -0300
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: extglob patterns not expanded in -c command-strings Paulo Marcel Coelho Aragão <marcelpaulo@gmail.com> - 2018-05-27 22:42 -0300

#14157 — Re: extglob patterns not expanded in -c command-strings

FromPaulo Marcel Coelho Aragão <marcelpaulo@gmail.com>
Date2018-05-27 22:42 -0300
SubjectRe: extglob patterns not expanded in -c command-strings
Message-ID<mailman.606.1527471745.1292.bug-bash@gnu.org>
> If you apply that rule, you can figure out the answer: extglob changes the
> behavior of the parser, so it must be enabled before a command is parsed.
> The complete line of input is read before any of it is parsed, and the
> complete line is parsed before any of it is executed. As a consequence, the
> extglob option must be enabled for the ( to be recognized as an extended
> globbing pattern instead of an operator.

I replied before reading your answer, my apologies. You unvealed the mystery ! Now I understand why it works as expected with -O extglob: it enables it BEFORE parsing the command.

Thank you so much for shedding light on this !

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web