Skip to content

Commit

Permalink
Tidy man command help.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Jul 8, 2022
1 parent 5e7ffad commit e3cfe2a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
45 changes: 21 additions & 24 deletions cylc/flow/scripts/cylc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,24 @@ def get_version(long=False):


USAGE = f"""{cylc_header()}
Cylc ("silk") orchestrates complex cycling (and non-cycling) workflows.
Cylc ("silk") efficiently manages distributed cycling workflows.
This is Open Source software (GPL-3.0): see "cylc help license".
Version:
$ cylc version --long # print cylc-flow version and install path
$ cylc version --long
{get_version(True)}
Usage:
$ cylc help license # view the Cylc license (GPL-3.0)
$ cylc help all # list all commands
$ cylc validate <workflow> # validate a workflow configuration
$ cylc install <workflow> # install a workflow
$ cylc play <workflow> # run/resume a workflow
$ cylc scan # list all running workflows (by default)
$ cylc tui <workflow> # view/control workflows in the terminal
$ cylc stop <workflow> # stop a running workflow
Command Abbreviation:
# Commands can be abbreviated as long as there is no ambiguity in
# the abbreviated command:
$ cylc trigger WORKFLOW//CYCLE/TASK # trigger TASK in WORKFLOW
$ cylc trig WORKFLOW//CYCLE/TASK # ditto
$ cylc tr WORKFLOW//CYCLE/TASK # ditto
$ cylc t # Error: ambiguous command
$ cylc <sub-command> <OPTS> <ARGS>
Selected sub-commands are listed below. To view ALL sub-commands:
$ cylc help all
To view sub-command help:
$ cylc <sub-command> --help
Cylc IDs:
Cylc IDs take the form:
Workflows and tasks are uniquely identified by IDs of the form:
workflow//cycle/task
You can split an ID at the // so following two IDs are equivalent:
Expand All @@ -80,10 +72,16 @@ def get_version(long=False):
IDs can be written as globs:
*// # All workflows
workflow//* # All cycles in "workflow"
workflow//cycle/* # All tasks in "workflow" in "cycle"
workflow//* # All cycle points in "workflow"
workflow//cycle/* # All tasks in "workflow" with cycle point "cycle"
For more information type "cylc help id".
$ cylc help id # More information on IDs
Cylc commands can be abbreviated:
$ cylc trigger WORKFLOW//CYCLE/TASK # trigger TASK in WORKFLOW
$ cylc trig WORKFLOW//CYCLE/TASK # ditto
$ cylc tr WORKFLOW//CYCLE/TASK # ditto
$ cylc t # ERROR: ambiguous (trigger, tui)
"""

ID_HELP = '''
Expand Down Expand Up @@ -431,7 +429,7 @@ def cli_help():
from colorama import init as color_init
color_init(autoreset=True, strip=False)
print(USAGE)
print('Selected Sub-Commands:')
print('Selected cylc commands (type "cylc help all" to see more):')
print_command_list(
# print a short list of the main cylc commands
commands=[
Expand All @@ -449,7 +447,6 @@ def cli_help():
],
indent=2
)
print('\nTo see all commands run: cylc help all')
sys.exit(0)


Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scripts/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"""cylc trigger [OPTIONS] ARGS
Trigger tasks - i.e. tell them to run even if they are not ready.
Run tasks despite unsatisfied prerequisites.
Triggering an unqueued waiting task queues it, regardless of prerequisites.
Expand Down

0 comments on commit e3cfe2a

Please sign in to comment.