bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option


From: Chet Ramey
Subject: Re: [PATCH v2 5/8] builtins/source: parse the -i option
Date: Mon, 20 May 2024 15:55:33 -0400
User-agent: Mozilla Thunderbird

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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