aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRoy Sommer <royso@wix.com>2020-01-02 19:12:08 +0200
committerRoy Sommer <royso@wix.com>2020-01-02 19:12:08 +0200
commitb7c1dc794d4e4faa068594139e945fbeac7b02b5 (patch)
treec63f4ee8a615bafbb735820388993cfa4635159d /README.md
parentupdated pytoml (diff)
downloadtaskipy2-b7c1dc794d4e4faa068594139e945fbeac7b02b5.zip
added support for passing arguments into taskipy tasks
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index e82c520..72a541b 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,23 @@ In order to run a task, run the following command in your terminal:
poetry run task test
```
+### Passing Command Line Args to Tasks
+If you want to pass command line arguments to tasks (positional or named), simply append them to the end of the task command.
+
+For example, running the above task like this:
+```bash
+poetry run task test -h
+```
+
+Is equivalent to running:
+```bash
+python -m unittest tests/test_*.py -h
+```
+
+And will show unittest's help instead of actually running it.
+
+> ⚠️ Note: if you are using pre \ post hooks, do notice that arguments are not passed to them, only to the task itself.
+
### Composing Tasks
#### Grouping Subtasks Together
Some tasks are composed of multiple subtasks. Instead of writing plain shell commands and stringing them together, you can break them down into multiple subtasks: