From 8dbf3ff6c548c9b1e2b74c8eeb3b4cda584cbfd0 Mon Sep 17 00:00:00 2001 From: Yannick DAYER Date: Tue, 23 Jul 2024 14:35:21 +0200 Subject: [PATCH] fix(cli): add range specs to --jobs' help message. Add an indication on how to specify ranges in the help message of the `--jobs` (`-j`) option of the `gridtk list` command. --- src/gridtk/cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gridtk/cli.py b/src/gridtk/cli.py index ef1f43f..9095521 100644 --- a/src/gridtk/cli.py +++ b/src/gridtk/cli.py @@ -119,7 +119,12 @@ def _job_filters_decorator(function): "-j", "--jobs", "job_ids", - help="Selects only these job ids, separated by comma.", # TODO: explain range notation + help=( + "Selects only these job ids, separated by comma. A range can also be " + "specified in the form 'start-end' ('-j 3-5' is equivalent to " + "'-j 3,4,5') or in the form 'start+length' ('-j 4+3' is equivalent to " + "'-j 4,5,6,7')." + ), callback=job_ids_callback, )(function) function = click.option(