Re: New command eval.

2013-05-14 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 12.05.2013 02:07, Seth Goldberg wrote: > Hi, > > What about the feature environment variable to allow dynamic detection of > this enhancement? if eval; then # Use eval else # Don't use eval fi Or if eval true; then # Use eval else # Don't use eval fi signature.asc Descrip

Re: New command eval.

2013-05-13 Thread Vladimir 'φ-coder/phcoder' Serbinenko
> diff --git a/ChangeLog b/ChangeLog > index cd8213a..60c64ee 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,11 @@ > +2013-05-11 Andrey Borzenkov > + > + * grub-core/script/execute.c (grub_script_execute_sourcecode): Split > + off new function grub_script_execut

Re: New command eval.

2013-05-12 Thread Seth Goldberg
On May 11, 2013, at 10:39 PM, Andrey Borzenkov wrote: > В Sat, 11 May 2013 17:07:19 -0700 > Seth Goldberg пишет: > >> Hi, >> >> What about the feature environment variable to allow dynamic detection of >> this enhancement? >> > > That really does not scale. Commands come and go. What about

Re: New command eval.

2013-05-11 Thread Andrey Borzenkov
В Sat, 11 May 2013 17:07:19 -0700 Seth Goldberg пишет: > Hi, > > What about the feature environment variable to allow dynamic detection of > this enhancement? > That really does not scale. Commands come and go. What about single command "has" (or probably better "implements") as in impleme

Re: New command eval.

2013-05-11 Thread Seth Goldberg
gt; that eval context would not clobber positional arguments. > > diff --git a/ChangeLog b/ChangeLog > index cd8213a..8ca9874 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,11 @@ > +2013-05-11 Andrey Borzenkov > + > +* grub-core/script/execute.c (grub_script_execute_sou

Re: New command eval.

2013-05-11 Thread Andrey Borzenkov
eed a new scope for consistency. > diff --git a/ChangeLog b/ChangeLog index cd8213a..60c64ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-05-11 Andrey Borzenkov + + * grub-core/script/execute.c (grub_script_execute_sourcecode): Split + off new function grub_scri

Re: New command eval.

2013-05-11 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 11.05.2013 18:35, Andrey Borzenkov wrote: > + grub_size_t size = argc; /* +1 for final zero */ > + char *str, *p; > + grub_err_t ret; > + > + if (argc == 0) > +return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("missing arguments")); > + eval with no arguments returns success in bash, to mat

New command eval.

2013-05-11 Thread Andrey Borzenkov
b_script_execute_sourcecode): Split + off new function grub_script_execute_new_scope. Change callers to use + either of them as appropriate. + * grub-core/commands/eval.c: New command eval. + * docs/grub.texi (Commands): Document it. + 2013-05-11 Vladimir Serbinenko