On Sun, Nov 05, 2023 at 11:15:50AM +0100, Emanuele Torre wrote:
> Today, a user in the #bash IRC channel of libera.chat, misunderstood how
> nullglob is supposed to work because is documented incorrectly in the
> man page:
> 
>     'nullglob'
>          If set, Bash allows filename patterns which match no files to
>          expand to a null string, rather than themselves.
> 
> globs expand to nothing if there are no matches with nullglob set, not
> to the null/empty string.
> 
> o/
>  emanuele6

It may even be better to say that the patterns that do not match
any names are *removed*.  That way one avoids the complications and
ambiguities of explaining what the pattern expands or not expands to.


-- 
Andreas (Kusalananda) Kähäri
Uppsala, Sweden

.

Reply via email to