Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: unintuitive bracketing with return value



On Tue, Oct 18, 2022 at 1:12 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> describing the bracketing as if it were this:

Except for my copy-paste error, of course.  Put a "[" inside the "{".

> { "${${1}##*[*?]*}" ] &&
> echo "no wildcards"; printenv "$1" } || echo wildcards present
>
> which would do exactly what he wants.




Messages sorted by: Reverse Date, Date, Thread, Author