Skip to content

Instantly share code, notes, and snippets.

Anders K. Madsen lillesvin

Block or report user

Report or block lillesvin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rkumar
rkumar / gist:445735
Created Jun 20, 2010
ruby's OptionParser to get subcommands
View gist:445735
#!/usr/bin/env ruby -w
## Using ruby's standard OptionParser to get subcommand's in command line arguments
## Note you cannot do: opt.rb help command
## other options are commander, main, GLI, trollop...
# run it as
# ruby opt.rb --help
# ruby opt.rb foo --help
# ruby opt.rb foo -q
# etc
You can’t perform that action at this time.