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

2024-05-19 Thread konsolebox
On Sun, May 19, 2024 at 7:01 AM Matheus Afonso Martins Moreira wrote: > > > The issue is that what you want, and what I want, > > and what konsolebox wants (and everyone else) > > are all slightly different. > > The option solution which I proposed is not really in opposition > to anything that an

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

2024-05-19 Thread Phi Debian
On Sun, May 19, 2024 at 10:58 AM Matheus Afonso Martins Moreira < math...@matheusmoreira.com> wrote: > > This is not a problem that's introduced by this patch. > People can already do that today. Anyone could write > `alias source='rm -rf --no-preserve-root /*'` right now, > nothing stops them. So

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

2024-05-19 Thread G. Branden Robinson
At 2024-05-20T03:42:04+0700, Robert Elz wrote: > My memory is hopeless, and I'm sure someone on the list can supply the > correct attribution, but one of the big name CS people once said > something along the lines of "perfection isn't when there's nothing > left to add, but when there's nothing le

Re: ${var/\#} no longer works

2024-05-19 Thread Grisha Levit
On Sun, May 19, 2024, 14:05 konsolebox wrote: > Here's an output from devel branch bash and 5.2.26: > > $ bash-9 -c 'echo "$BASH_VERSION"; x="abc#xyz"; echo "${x/\#}"' > 5.3.0(1)-alpha > abc#xyz > $ bash-5.2.26 -c 'echo "$BASH_VERSION"; x="abc#xyz"; echo "${x/\#}"' > 5.2.26(1)-release > abcxy

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

2024-05-19 Thread Robert Elz
Date:Sun, 19 May 2024 10:31:30 + From:Matheus Afonso Martins Moreira Message-ID: <5LZgqrwhk0KEXRJqJIfPJzZvaJA8FVWbs_hnJHSPrPnzAzkjo7oA926voEMtU_3FGuZdylouhgpNXciyEJZPFdsScZ4pK0i4GLqv7ttR0nI=@matheusmoreira.com> | > the real work of the source ('.' really) utili

Re: printf -u "$fd"?

2024-05-19 Thread alex xmb sw ratchev
On Sun, May 19, 2024, 20:11 Kerin Millar wrote: > On Sun, 19 May 2024, at 5:08 PM, alex xmb sw ratchev wrote: > > On Sat, May 18, 2024, 04:54 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 Keri

Re: printf -u "$fd"?

2024-05-19 Thread Kerin Millar
On Sun, 19 May 2024, at 5:08 PM, alex xmb sw ratchev wrote: > On Sat, May 18, 2024, 04:54 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

${var/\#} no longer works

2024-05-19 Thread konsolebox
Here's an output from devel branch bash and 5.2.26: $ bash-9 -c 'echo "$BASH_VERSION"; x="abc#xyz"; echo "${x/\#}"' 5.3.0(1)-alpha abc#xyz $ bash-5.2.26 -c 'echo "$BASH_VERSION"; x="abc#xyz"; echo "${x/\#}"' 5.2.26(1)-release abcxyz -- konsolebox

Re: printf -u "$fd"?

2024-05-19 Thread alex xmb sw ratchev
On Sat, May 18, 2024, 04:54 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 an

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

2024-05-19 Thread Matheus Afonso Martins Moreira
> the real work of the source ('.' really) utility > is to read the file That's the work of read. > parse it, and execute it. That's the work of eval. > None of the proposed solutions here do that. Of course not. I read the proposals. The point is they probably could. So why not do it? A buil

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

2024-05-19 Thread Matheus Afonso Martins Moreira
> the library (the top one may be) decide that source -i > is the general way to go a decide a despotic alias > source='source -i' this could be a general setup of > this package manager. This is not a problem that's introduced by this patch. People can already do that today. Anyone could write `a