help-bash
[Top][All Lists]
Advanced

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

Re: extglob and ()/{}


From: Marco Ippolito
Subject: Re: extglob and ()/{}
Date: Mon, 5 Apr 2021 22:23:53 -0300

Greg said it all:

> extglob changes the way certain characters are parsed. It is necessary to
> have a newline (not just a semicolon) between shopt -s extglob and any
> subsequent commands to use it. You cannot enable extended globs inside a
> group command that uses them, because the entire block is parsed before the
> shopt is evaluated. Note that the typical function body is a group command.
> An unpleasant workaround could be to use a subshell command list as the
> function body.



reply via email to

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