Skip to content

Commit

Permalink
Add inner_args to usage summary
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Jun 10, 2024
1 parent 5ffe020 commit b4a2aaa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ usage: duct [-h] [--version] [-p OUTPUT_PREFIX]
[--report-interval REPORT_INTERVAL] [-c {all,none,stdout,stderr}]
[-o {all,none,stdout,stderr}]
[-t {all,system-summary,processes-samples}]
command ...
command [inner_args ...] ...

Gathers metrics on a command and all its child processes.

positional arguments:
command The command to execute.
command [inner_args ...]
The command to execute, along with its inner
arguments.
inner_args Arguments for the command.

options:
Expand Down
6 changes: 5 additions & 1 deletion src/duct.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ def create_and_parse_args():
description="Gathers metrics on a command and all its child processes.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument("command", help="The command to execute.")
parser.add_argument(
"command",
metavar="command [inner_args ...]",
help="The command to execute, along with its inner arguments.",
)
parser.add_argument(
"--version", action="version", version=f"%(prog)s {__version__}"
)
Expand Down

0 comments on commit b4a2aaa

Please sign in to comment.