Skip to content

Commit c8db7d1

Browse files
authored
Clarify task ID glob help (#6606)
Clarify task glob help.
1 parent ba6043d commit c8db7d1

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

cylc/flow/option_parsers.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,19 +242,20 @@ class CylcOptionParser(OptionParser):
242242

243243
MULTITASK_USAGE = dedent('''
244244
This command can operate on multiple tasks. Globs and selectors may
245-
be used to match active tasks:
245+
be used to match tasks in the n=0 active window (except in the
246+
`cylc show` command, where globs match in the wider n-window):
246247
Multiple Tasks:
247248
# Operate on two tasks
248249
workflow //cycle-1/task-1 //cycle-2/task-2
249250
250-
Globs (note: globs should be quoted and only match active tasks):
251-
# Match any active task "foo" in all cycles
251+
Globs (note: quote globs; they only match in the active-window):
252+
# Match any active-window task "foo" in all cycles
252253
'//*/foo'
253254
254255
# Match the tasks "foo-1" and "foo-2"
255256
'//*/foo-[12]'
256257
257-
Selectors (note: selectors only match active tasks):
258+
Selectors (note: selectors only match in the active window too):
258259
# match all failed tasks in cycle "1"
259260
//1:failed
260261

cylc/flow/scripts/cylc.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ def get_version(long=False):
146146
$ cylc pause foo/run1
147147
$ cylc stop foo/run1
148148
149-
In the case of numbered runs (e.g. "run1", "run2", ...) you can omit
150-
the run number, Cylc will infer latest run.
149+
If you omit run number ("run1", "run2", ...) Cylc will infer latest run.
151150
$ cylc play foo
152151
$ cylc pause foo
153152
$ cylc stop foo
@@ -164,8 +163,7 @@ def get_version(long=False):
164163
You can omit the user name when working on your own workflows.
165164
166165
Cycle / Family / Task / Job IDs:
167-
Just as workflows have IDs, the things within workflows have IDs too.
168-
These IDs take the format:
166+
Just as workflows have IDs, so do objects within workflows:
169167
cycle/task_or_family/job
170168
171169
Examples:
@@ -174,8 +172,7 @@ def get_version(long=False):
174172
1/a/1 # The first job of the task "a" in the cycle point "1".
175173
176174
Full ID
177-
We join the workflow and cycle/task/job IDs together using //:
178-
workflow//cycle/task/job
175+
Join workflow and cycle/task/job IDs with //: workflow//cycle/task/job
179176
180177
Examples:
181178
w// # The workflow "w"
@@ -201,8 +198,9 @@ def get_version(long=False):
201198
workflow//cycle/task/* # All jobs in workflow//cycle/job
202199
203200
Warning:
204-
Remember to write IDs inside single quotes when using them on the
205-
command line otherwise your shell may expand them.
201+
Quote IDs on the command line to protect them from shell expansion.
202+
Patterns only match tasks in the n=0 active window (except for the
203+
`cylc show` command where they match in the wider n-window).
206204
207205
Filters
208206
Filters allow you to filter for specific states.

0 commit comments

Comments
 (0)