One of the good things about having a project as large as this one is that when you get bored working on one thing there are many other things you can work on to keep your motivation going.
Today's bit of fun for me was to extend the console user input behaviour to support a single key "choice" from a set of options.
A console user input line begins with an ampersand character (&) with what follows typically being in the following form:
&VAR=
When executed by a CIYAM console the above would prompt the user with:
VAR=
and the user would type in the value and press enter (even if standard input was redirected from a file this would be direct console input).
But let's say we wanted the user to decide whether or not to continue something. It would be nice to just be able to type a simple 'y' or 'n' character (with no need to hit an Enter key) and this is what the "choice" addition I made today allows.
Here is an example of what you would put into the console script:
&Continue? [yes=1!Yes|no=!No] (choose one)
When the console command handler reads this you'll see the following output to the console:
Continue? [y]es, [n]o (choose one)
Assuming you hit 'y' then the above line would instantly change to this:
Continue? Yes
And the actual "command" issued would be this:
Continue=1
which then could be used with say an @ifdef conditional such as the following:
@ifdef $Continue
#we are continuing...
@else
#we are not continuing...
@endif
Obviously extending the console conditional handling to check values (rather than just whether empty or not) is something that will need to be added in order to make this new feature more usable but that will have to wait for another day when I'm bored.