|
From: | Zachary Santer |
Subject: | Re: feature todo .. be able to unset vars at assignment stage , without unset util , for coding language fair extendment |
Date: | Fri, 23 Feb 2024 17:00:09 -0500 |
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?
[Prev in Thread] | Current Thread | [Next in Thread] |