help-bash
[Top][All Lists]
Advanced

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

Re: feature todo .. be able to unset vars at assignment stage , without


From: alex xmb sw ratchev
Subject: Re: feature todo .. be able to unset vars at assignment stage , without unset util , for coding language fair extendment
Date: Mon, 26 Feb 2024 19:26:18 +0100

On Fri, Feb 23, 2024, 23:30 Zachary Santer <zsanter@gmail.com> wrote:

> On Fri, Feb 23, 2024 at 12:51 PM Zachary Santer <zsanter@gmail.com> wrote:
>
> >
> > Whereas, the syntax I've settled on would allow all the same stuff:
> > {~DISPLAY} xsomething
> > {~http_proxy} wget "$url"
> > {~http_proxy} WGET_ASKPASS="$pass_program" wget "$url"
> >
>
> This kind of syntax could also be used to unset a range of elements within
> an indexed array, with something looking like substring expansion on an
> array:
> {~arr[@]:offset:length}
>
> Something the unset command can't do dynamically without the programmer
> constructing a list of array elements in another array. just to expand that
> as arguments to the unset command. Or just calling the unset
> command multiple times.
>
> Maybe bring the tilde outside of the curly braces:
> ~{DISPLAY} xsomething
> ~{arr[@]:offset:length}
>
> Dollar sign expands. Tilde unsets. Does that make sense?
>

very interesting

as for i do example .. i cant
i have it hard in life , and couldnt bring up representable english case

sorry , greets

>


reply via email to

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