On Thu, Sep 12, 2013 at 7:03 PM, David Korn <[email protected]> wrote:
> cc: [email protected]
> Subject: Re: unset -c (was:Re: [ast-users] ksh93 returns "()" for "${a[@]}" 
> if I  clear an array with a=( ))
> --------
>
>> What happened to the unset -c proposal to "clear" a variable, e.g.
>> reset an array/type to its default values?
>>
>> Technically we're more interested in a nv_clear_array() library
>> function to do the same via libshell API for our builtins, but a
>> generic unset(1) option would do it too.
>>
>> Irek
>>
>
> This is currently done in sh_setlist() but I can look at moving
> the code into _nv_unset() with an option.

I'd strongly prefer a separate function call (nv_clear_array() or
nv_clear_var()). Otherwise it makes debugging and tracing even harder
than it is already now.

Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to