From 7e8eee21f1868896915dcd8da5606354447bb8ef Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Mon, 3 Nov 2025 10:52:14 +0000 Subject: [PATCH] add command.catch_all.catch_help --- src/configuration/command.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/configuration/command.md b/src/configuration/command.md index 5d91691..ce84e15 100644 --- a/src/configuration/command.md +++ b/src/configuration/command.md @@ -223,12 +223,27 @@ flags. It can be set in one of three ways: -- Set to `true` to just enable it. -- Set to a string, to show this string in the usage help text. -- Set to a hash containing `label`, `help` and `required` keys, to show a - detailed help for it when running with `--help`. By default, `catch_all` - arguments are optional, but you can specify `required: true` to require at - least one argument. ++++ Boolean +```yaml +# Enable catch all +# Default: false +catch_all: true +``` ++++ String +```yaml +# Enable catch all and use this string in the usage text +catch_all: docker_params +``` ++++ Hash +```yaml +# Configure all aspects of this feature. +catch_all: + label: params # usage label + help: Docker parameters # help text + required: true # require at least one parameter + catch_help: true # also catch `--help/-h` as any other parameter +``` ++++ To access arguments captured by `catch_all` in your script, use the `$other_args` array (or call the `inspect_args` command to see them).