On 5/19/24 4:58 AM, Matheus Afonso Martins Moreira wrote:

Bash has the command builtin which can be used to
ensure a real utility is executed instead of an alias or
function. It also works for builtins such as source.
I could also propose a new flag for it that restricts
its operation to builtins only, eliminating the PATH
search and ensuring that builtins cannot be replaced
by a program on the file system either.

This exists as the `builtin' builtin, and has for many years.

I'm not sure what the maintainer would think about it
but I could also propose a shopt that prohibits the
aliasing of builtins and other reserved words.

I would decline, as I have in the past. If you want to prohibit aliasing
reserved words and special builtins, posix mode will do that for you. If
you want to prevent builtin names from being alias expanded, use the
`builtin' builtin.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to