bug-bash
[Top][All Lists]
Advanced

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

Re: unset does not remove functions like a[b] unless -f is specified


From: Martin D Kealey
Subject: Re: unset does not remove functions like a[b] unless -f is specified
Date: Thu, 2 Feb 2023 16:47:34 +1000

> ...in posix mode, fname must be a valid shell name and may not be the name
> of one of the POSIX special builtins.
> In default mode, a function name can be any unquoted shell word that does
> not contain $.  ...
>

I'm guessing the intention is that it shouldn't contain any expansions, so
it also shouldn't contain `backticks` or <(command substitutions).

Hmm, I wonder whether <(:) could be a valid function name, if it expands to
something like /dev/fd/63?

I agreed, it's better to make the documentation agree with how it actually
behaves, rather than add more weirdness to the behaviour.

-Martin


reply via email to

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