John Resig shell library for Eiffel programmers
Eiffel
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
library
README

README

This is an attempt to use Eiffel to write shell scripts.

Safe shell scripts are not that easy to write, most of them happily
continue in case of errors.

So why not use Eiffel to it better?

The idea is to write shell scripts the jQuery way. To see how this works.

Examples:

  ls ("*.html").grep ("whatever").words (agent ...)

  ls (<<"system/test.inc", "modules/test.inc">>).each (agent (a_path_name: STRING): BOOLEAN
    do
       ...
     end)



State of the code: quite messy. I'm just experimenting at the moment.


For example why do I have JRS_LINES_INPUT_ITERATOR and
JRS_LINES_OUTPUT_ITERATOR as well as JRS_STRING_ITERATOR?

Possibly because the JRS_LINES_INPUT_ITERATOR allows for not all lines
to be read. But doesn't that mean I should get rid of
JRS_STRING_ITERATOR?

Perhaps rename JRS_LINES_OUTPUT_ITERATOR to JRS_LINES_ITERATOR to make
clear this is a class that iterates over lines (strings).


JRS_LINES_OUTPUT_ITERATOR should inherit from JRS_ITERATOR and be
renamed to JRS_LINES_ITERATOR. The each function should be as from JRS_ITERATOR, the each that gives iterator as parameter should be called each2.