positional argument propagation?
I don't want to specify multiple tasks on the CLI, just a single task at a time. For me, &&, is sufficient for running multiple tasks.
Instead, I want full ARG propagation. For example, I want to be be able to run:
runner lab notebooks/test.ipynb --debug
where the task_lab is defined as simply propagating the entire "$@" to jupyter lab with some default options already set.
Is this possible? I get an error saying the notebooks/test.ipynb task doesn't exist so its presumably thinking each positional argument is a task.
its presumably thinking each positional argument is a task.
Correct.
It only propagates arguments that begin with a dash. Can't suggest any workaround, because Runner CLI simply wasn't designed for this, and it will all be hacky. You can roll your own argument parser instead of using Runner CLI.
You may also take a look at the future version in the next branch. Although it's a work in progress, the core idea is that everything is DIY, and it has a huge library of helper functions which you can copy/include and use in your own launcher/build script, in your case, this file: https://github.com/stylemistake/runner/blob/next/lib/argparse.sh
Cool, thanks! Will the next version by any chance allow disabling task chaining to allow for full argument propagation?
Yeah, I'll take it into consideration.