Commit 9cb5ca98 authored by one's avatar one
Browse files

[hytop] Update help messages

parent 9e829f84
...@@ -37,18 +37,18 @@ def root( ...@@ -37,18 +37,18 @@ def root(
"localhost", "localhost",
"--hosts", "--hosts",
"-H", "-H",
help="Comma-separated hosts, e.g. node01,node02. Default: localhost", help="Comma-separated hosts, e.g. node01,node02.",
), ),
interval: float = typer.Option( interval: float = typer.Option(
1.0, 1.0,
"--interval", "--interval",
"-n", "-n",
help="Polling interval in seconds. Default: 1.0", help="Polling interval in seconds.",
), ),
window: float = typer.Option( window: float = typer.Option(
5.0, 5.0,
"--window", "--window",
help="Single rolling window in seconds. Default: 5.0", help="Single rolling window in seconds.",
), ),
timeout: float | None = typer.Option( timeout: float | None = typer.Option(
None, None,
...@@ -57,6 +57,10 @@ def root( ...@@ -57,6 +57,10 @@ def root(
), ),
) -> None: ) -> None:
"""Root callback that parses global options and stores them in context.""" """Root callback that parses global options and stores them in context."""
if ctx.invoked_subcommand is None:
typer.echo(ctx.get_help())
raise typer.Exit()
try: try:
host_list = parse_csv_strings(hosts, "--hosts") host_list = parse_csv_strings(hosts, "--hosts")
window_value = parse_positive_float(str(window), "--window") window_value = parse_positive_float(str(window), "--window")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment