vagrant
https://github.com/mitchellh/vagrant
Ruby
Vagrant is a tool for building and distributing development environments.
Vagrant::Plugin::V2::Command#split_main_and_subcommand
This method will split the argv given into three parts: the
flags to this command, the subcommand, and the flags to the
subcommand. For example:
-v status -h -v
The above would yield 3 parts:
["-v"]
"status"
["-h", "-v"]
These parts are useful because the first is a list of arguments
given to the current command, the second is a subcommand, and the
third are the commands given to the subcommand.Edit
git clone [email protected]:mitchellh/vagrant.git
cd vagrant
open lib/vagrant/plugin/v2/command.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Vagrant--Plugin--V2--Command-split_main_and_subcommand-for-pr
# Commit to gitgit add lib/vagrant/plugin/v2/command.rbgit commit -m "better docs for Vagrant::Plugin::V2::Command#split_main_and_subcommand"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Vagrant--Plugin--V2--Command-split_main_and_subcommand-for-pr
hub pull-request
# Celebrate!