Skip to content

Support named task arguments #81

Open
@jochenseeber

Description

@jochenseeber

When creating tasks that take multiple optional arguments, specifying parameters becomes tedious.

When calling the following task

task :test, [:database, :table, :column, :host, :port, :user, :password] do
    # Something
end

and specifying only parameter user, I have to count its position and call rake as follows:

rake 'test[,,,,,testuser,]'

I suggest supporting a syntax using named parameters that makes calling these tasks easier and more readable, e.g.

rake 'test{user:testuser}'

I'd like to put this up for discussion, if it is acceptable, I'm willing to create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions