All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Serbinenko <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Scripting framework
Date: Thu, 27 Oct 2005 11:51:44 +0200	[thread overview]
Message-ID: <4360A330.4030808@gmail.com> (raw)
In-Reply-To: <874q78uy4l.fsf@student.han.nl>

I wrote the scripting support.
The patch can be found under http://phcoder.hut1.ru/bash.patch

As in this version there is no arithmethic support I added commands true5 and false 5 for testing
They return five times true and then false (true5) or inverse (false5)

TODO:
1) Positional arguments like $1, $2, ... and $*/$@ 
2) Arithmethic module for commands like ((2+3*5)) 
3) logical module for commands like [[ -f /boot/vmlinuz ]] 
4) break, continue and return commands
5) menu parameters like:
menu --default "Linux" { ... } 
Can anybody propose the way to generate menu entries from loop?
What about
menu --prepend var=val --prepend val=var ...
Then compiler will expand var=val and put it to the begin of menu
6) Regexp recognizer for case command

In difference with bash ( and ) are not the word separators. So you have to put spaces around them in case command
e.g.
case $x in ( 123 ) ....;; ... esac 
and not
case $x in (123) ....;; ... esac 
The same with functions.
e.g. hello ( ) { .. } 
or 
hello () { .. }
and not
hello() { .. }
Command select is not done. Menu should be enough.
Expansions and arrays are NOT the part of scripting but of split_cmdline and environment and is not made yet

Unfortunately I have now no more time. So I send this letter as is. More information will be available in my next letter and on the site.
	
										Vladimir 'phcoder' Serbinenko







  reply	other threads:[~2005-10-27  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-23 14:05 Scripting framework Marco Gerards
2005-10-27  9:51 ` Vladimir Serbinenko [this message]
2005-10-27 13:25   ` Marco Gerards
2005-10-27 15:09     ` Vladimir Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4360A330.4030808@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.