krieselreihe / litr

Litr (Language Independent Task Runner) lets you configure and then run any tasks you want for any language.
MIT License
8 stars 0 forks source link

How to handle positional arguments #7

Open MartinHelmut opened 3 years ago

MartinHelmut commented 3 years ago

Currently the only way to pass values is via parameters. Explore the option for positional parameters. Here a very early draft:

[commands.build]
script = "build some file %{0}"

As numbers are not allowed for parameter names they can be used to reference to a positional argument. To give more context to an argument:

[commands.build]
script = "build some file %{0}"
arguments = [
  { name = "file", description = "Something nice" } # Relates to %{0} 
]

Defined options are:

MartinHelmut commented 3 years ago

Is blocked by: #20