[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:36:54 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/18/24 11:17 AM, Phi Debian wrote:
an enforcement that no
alias source='source -i' could ever be possible.
This seems ridiculous. There should never be a prohibition against a user
doing something that is not dangerous.
All this is because one writing a 'main' script (#!/bin/bash), sourcing a
package of mine through my package management system, expecting the current
source behavior, and later add the loading of a 'libraries' from a friend
(terminal color jazz) that in turn start to mess around with alias
source='source -i' and BASH_SOURCE_PATH cold start to break my way of
finding my packages.
If you're worried about this, unalias source after loading this friend's
`library'. You're already changing your environment to include it.
An alternative to this would be
BASH_SOURCE_PATH="" don't do nothing with 'source', and allow the
'libraries' designer to do
typeset -r BASH_SOURCE_PATH=""
No. If you want to make sure it's unset, force it to remain unset, and
prevent anyone from setting it,
unset BASH_SOURCE_PATH
readonly BASH_SOURCE_PATH
will do the job.
--
``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, (continued)
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Lawrence Velázquez, 2024/05/18
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/18
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Phi Debian, 2024/05/19
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/19
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Phi Debian, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option,
Chet Ramey <=
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/18
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/20
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/18
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/19
Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20