Skip to content

Subcommands as a script (concept capture) #41

Open

Description

@mjdorma

I recently worked on a problem which resulted in a powerful set of subcommands. When chained together, I could use these subcommands to drive and define a variety of complex system state.

As a result of this problem, I built a special subcommand that has the ability to read in and execute a sequence of subcommands.

See gist for reference: https://gist.github.com/mjdorma/9516371

I'm not sure that this specific capability belongs in beings, but in the very least it is good to capture the concept to give begins a chance to support it into the future.

Activity

  1. aliles commented on Mar 19, 2014

    @aliles
    Owner

    My thought is to provide a new command line extension that would provide a --command option. This option would accept a file, or standard in, from which subcommands would be read. (one per line). These would be run after any subcommands passed via the command line are run.

    The API would resemble something like:

    @begin.start
    @begin.commands
    def main():
        pass
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions