On Sun, May 19, 2024 at 1:17 AM Matheus Afonso Martins Moreira <
math...@matheusmoreira.com> wrote:
>
> Those should continue to work without any changes.
> They should even be compatible with each other:
> there should be no problems with sourcing -i a script
> which then sources another script n
On Sat, 18 May 2024, at 3:53 AM, Zachary Santer wrote:
> Was «difference between read -u fd and read <&"$fd"» on help-b...@gnu.org
>
> On Thu, May 16, 2024 at 12:51 AM Kerin Millar wrote:
>>
>> On Thu, 16 May 2024, at 3:25 AM, Peng Yu wrote:
>> > Hi,
>> >
>> > It appears to me that read -u fd and
Date:Sat, 18 May 2024 23:00:41 +
From:Matheus Afonso Martins Moreira
Message-ID:
| If you resolve the path, you're just reinventing the source builtin.
Nonsense, the real work of the source ('.' really) utility is to
read the file, parse it, and execute it.
> distros, sysadmins, and users can already break your scripts
> in plenty of ways -- changing existing shell variables, setting
> shopts your scripts don't account for, etc.
Existing footguns doesn't justify addition of new ones.
We have the ability to prevent a lot of breakage here.
Shouldn't
> The issue is that what you want, and what I want,
> and what konsolebox wants (and everyone else)
> are all slighty different.
The option solution which I proposed is not really in opposition
to anything that anyone else wants. It will not break anything,
it supports the same inputs and use case
On Sat, May 18, 2024, at 11:17 AM, Phi Debian wrote:
> I am xing fingers the consensus, if any of theses takes off,
> is to have [...] protection against alias source='source -i'
This seems out of scope, regardless of what happens with "-i".
> I really depend on actual 'source' behavior, and can
Date:Sat, 18 May 2024 08:39:57 -0300
From:Matheus Afonso Martins Moreira
Message-ID:
| As the user, it should be my prerogative to set the
| variable on my environment and/or rc so that I can
| organize my sourceable scripts however I want
Of course. The is
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin23.2.0
Compiler: /usr/bin/clang
Compilation CFLAGS: -pipe -Os -DSSH_SOURCE_BASHRC
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64
uname output: Darwin Mohameds-MBP 23.4.0 Darwi
On Sat, May 18, 2024, at 11:41 AM, Matheus Afonso Martins Moreira wrote:
>> I am xing fingers the consensus, if any of theses takes off,
>> is to have the -i implemented (not omitted)
>
> Me too. Do you know anyone else who could be impacted?
> Consensus might move in that direction if more voices
> I am xing fingers the consensus, if any of theses takes off,
> is to have the -i implemented (not omitted)
Me too. Do you know anyone else who could be impacted?
Consensus might move in that direction if more voices make
themselves heard on this list.
> if one, distro, sysadmin, and ultimatly
On Sat, May 18, 2024 at 3:23 PM Matheus Afonso Martins Moreira <
math...@matheusmoreira.com> wrote:
>
> > That would cause shell scripts to see it and exhibit a change in
> behavior.
>
> Only if the -i option is not implemented.
> If it is, there will be zero change in behavior
> whether BASH_SOUR
> You've made contradictory statements here.
I don't see how.
> First you said you wanted to put it into your *environment*.
Yes.
> That would cause shell scripts to see it and exhibit a change in behavior.
Only if the -i option is not implemented.
If it is, there will be zero change in behavi
On Sat, May 18, 2024 at 08:39:57AM -0300, Matheus Afonso Martins Moreira wrote:
> > Setting the variable at all is opting in to new behavior, and you do
> > that at your own risk, after reading the documentation and deciding
> > that this is what you want.
>
> As the user, it should be my prerogat
> Setting the variable at all is opting in to new behavior, and you do
> that at your own risk, after reading the documentation and deciding
> that this is what you want.
As the user, it should be my prerogative to set the
variable on my environment and/or rc so that I can
organize my sourceable s
On Sat, May 18, 2024 at 9:18 AM Martin D Kealey wrote:
> On Thu, 16 May 2024 at 22:50, konsolebox wrote:
>>
>> On Thu, May 16, 2024 at 4:59 PM Martin D Kealey
>> wrote:
>> > As I understood your counter-proposal, it would result in this:
>> > * ./a and ./b/c/d would be treated as relative to $P
I also uploaded a copy of the script and the patch to gist:
https://gist.github.com/konsolebox/a908cf13e511abdf05daec89a9cbdd8d
--
konsolebox
This is what I think an acceptable implementation of `source -i`
should look like:
#!/bin/bash
if [[ BASH_VERSINFO -ge 5 && ${SOURCE_EXTENSIONS_LOADED-} != true ]]; then
function source._die {
printf '%s\n' "$1" >&2
exit "${2-1}"
}
function source
17 matches
Mail list logo