[Nitro] opinion on console command facet

TRANS transfire at gmail.com
Sun Jun 18 20:50:05 EDT 2006


another one of my opinion queries....

consoleapp.rb has to be renamed b/c what was Console::Application is
now Console::Command. as of this upcoming release the
Console::Applicaiton will no longer be available. so the question is
what to rename the file:

  1) slight change to 'consolecmd.rb'.

  2) something more succinct 'command.rb'

  3) or is it time to subdir: 'console/command.rb'

by the way I've added run-on flag supprt (eg. -xvzf) as well some help
support, ex-

  # bin/example

  class MyCmd << Console::Command

    help "This does something"

    def something
      puts "Something!"
    end

    help "This does another"

    def another
      puts "Another!"
    end

  end

  MyCmd.execute

then at the CLI (command line interface)

  % example help
  example
    another      This does another
    something  This does something

it's still a bit primitive obviously but we can improve it over time.

thanks,
T.



More information about the Nitro-general mailing list