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.

Source | Google | Stack overflow

Edit

git clone [email protected]:mitchellh/vagrant.git

cd vagrant

open lib/vagrant/plugin/v2/command.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Vagrant--Plugin--V2--Command-split_main_and_subcommand-for-pr


# Commit to git

git add lib/vagrant/plugin/v2/command.rbgit commit -m "better docs for Vagrant::Plugin::V2::Command#split_main_and_subcommand"


# Open pull request

gem 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!