help-bash
[Top][All Lists]
Advanced

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

Re: Bash ini builtin implementation feedback


From: Chet Ramey
Subject: Re: Bash ini builtin implementation feedback
Date: Tue, 6 Jul 2021 12:05:13 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/2/21 10:11 AM, Jesse Hathaway wrote:
On Thu, Jul 1, 2021 at 9:15 AM Jesse Hathaway <jesse@mbuki-mvuki.org> wrote:

  SHELL_VAR *sec_var = find_or_make_array_variable(sec_var_name, vflags);
  if (!sec_var) {
    builtin_error("Could not make %s", sec_var_name);
    free(sec_var_name);
    return 0;
  }

Chet, is there a way to make this a local variable if the builtin is called
inside of a function, similar to the way `declare` works?

You can  use make_local_array_variable if variable_context > 0. It takes
flags prefixed by MKLOC_, which appear in variables.h, but none of them
should affect your use.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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