Skip to content

Document how commands receive arguments after a double dash - #952

Open
addielaruee wants to merge 1 commit into
rails:mainfrom
addielaruee:fix/401-document-trailing-options
Open

addielaruee wants to merge 1 commit into
rails:mainfrom
addielaruee:fix/401-document-trailing-options

Conversation

@addielaruee

Copy link
Copy Markdown

Fixes #401

A default string argument captures a single value. The argument documentation now shows how to use a command method with *args to receive flags and filenames after --.

I ran the example through bin/thor and checked the empty argument list and a flag on each side of the separator. The existing parser and command specs cover this behavior. bundle exec rspec passed all 997 examples, and bundle exec rubocop passed.

Show how a command can collect trailing flags and filenames when a single declared argument only captures the first value.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No documentation for trailing options

1 participant