Saturday, 7 September 2013

Ruby thor command line tool commands

Ruby thor command line tool commands

I am planning on making my first command line tool and was wondering about
how the naming and commands work.
I would like my tool to function similarly to Git, in the sense that you
just install it, then to run commands you just enter git clone or git
commit. In many of the examples I have seen the tools are something like
thor foo:bar or ./foo.rb bar.
My main question is how can I make it so if my tools name is Foo, and the
command in my tool is bar, all the user has to do is run Foo bar in the
command line.

No comments:

Post a Comment