diff --git a/README.md b/README.md index 6e69b74..2296456 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ $ docker runx decorate alpine --tag NAMESPACE/REPOSITORY You can then display the embedded readme: ``` -$ dockedr runx NAMESPACE/REPOSITORY --docs +$ docker runx NAMESPACE/REPOSITORY --help ``` Or run the `hello` action: @@ -69,7 +69,7 @@ See more examples in the [examples](/examples) directory. ### Usage -> `docker runx IMAGE --docs` +> `docker runx IMAGE --help` > > Display the embedded documentation of an image and print the list of available actions. @@ -81,7 +81,7 @@ See more examples in the [examples](/examples) directory. > > Run a specific action on an image. -> `docker runx IMAGE ACTION --docs` +> `docker runx IMAGE ACTION --help` > > Display a detailed documentation of a specific action. This will also display the list of available options, shell scripts, environment variables. diff --git a/docs/index.markdown b/docs/index.markdown index 942bb0c..4fa659d 100644 --- a/docs/index.markdown +++ b/docs/index.markdown @@ -47,7 +47,7 @@ $ docker runx decorate alpine --tag NAMESPACE/REPOSITORY You can then display the embedded readme: ``` -$ dockedr runx NAMESPACE/REPOSITORY --docs +$ docker runx NAMESPACE/REPOSITORY --help ``` Or run the `hello` action: @@ -62,7 +62,7 @@ See more examples in the [examples](https://github.com/eunomie/docker-runx/tree/ ### Usage -> `docker runx IMAGE --docs` +> `docker runx IMAGE --help` > > Display the embedded documentation of an image and print the list of available actions. @@ -74,7 +74,7 @@ See more examples in the [examples](https://github.com/eunomie/docker-runx/tree/ > > Run a specific action on an image. -> `docker runx IMAGE ACTION --docs` +> `docker runx IMAGE ACTION --help` > > Display a detailed documentation of a specific action. This will also display the list of available options, shell scripts, environment variables. diff --git a/docs/reference/docker_runx.yaml b/docs/reference/docker_runx.yaml index 80c9a5c..ed24d0d 100644 --- a/docs/reference/docker_runx.yaml +++ b/docs/reference/docker_runx.yaml @@ -7,12 +7,10 @@ plink: docker.yaml cname: - docker runx cache - docker runx decorate - - docker runx help - docker runx version clink: - docker_runx_cache.yaml - docker_runx_decorate.yaml - - docker_runx_help.yaml - docker_runx_version.yaml options: - option: ask @@ -30,6 +28,17 @@ options: value_type: bool default_value: "false" description: Print the documentation of the image + deprecated: true + hidden: true + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation deprecated: false hidden: false experimental: false diff --git a/docs/reference/docker_runx_cache.yaml b/docs/reference/docker_runx_cache.yaml index 075d9cd..106e2cf 100644 --- a/docs/reference/docker_runx_cache.yaml +++ b/docs/reference/docker_runx_cache.yaml @@ -9,6 +9,18 @@ cname: clink: - docker_runx_cache_df.yaml - docker_runx_cache_prune.yaml +inherited_options: + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false hidden: false experimental: false diff --git a/docs/reference/docker_runx_cache_df.yaml b/docs/reference/docker_runx_cache_df.yaml index e0697fe..cbee59b 100644 --- a/docs/reference/docker_runx_cache_df.yaml +++ b/docs/reference/docker_runx_cache_df.yaml @@ -4,6 +4,18 @@ long: Show disk usage usage: docker runx cache df pname: docker runx cache plink: docker_runx_cache.yaml +inherited_options: + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false hidden: false experimental: false diff --git a/docs/reference/docker_runx_cache_prune.yaml b/docs/reference/docker_runx_cache_prune.yaml index cf92e13..dd33823 100644 --- a/docs/reference/docker_runx_cache_prune.yaml +++ b/docs/reference/docker_runx_cache_prune.yaml @@ -28,6 +28,18 @@ options: experimentalcli: false kubernetes: false swarm: false +inherited_options: + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false hidden: false experimental: false diff --git a/docs/reference/docker_runx_decorate.yaml b/docs/reference/docker_runx_decorate.yaml index 0466999..f5f0cc7 100644 --- a/docs/reference/docker_runx_decorate.yaml +++ b/docs/reference/docker_runx_decorate.yaml @@ -55,6 +55,18 @@ options: experimentalcli: false kubernetes: false swarm: false +inherited_options: + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false hidden: false experimental: false diff --git a/docs/reference/docker_runx_version.yaml b/docs/reference/docker_runx_version.yaml index 624900c..dbc7b3b 100644 --- a/docs/reference/docker_runx_version.yaml +++ b/docs/reference/docker_runx_version.yaml @@ -4,6 +4,18 @@ long: Show Docker RunX version information usage: docker runx version pname: docker runx plink: docker_runx.yaml +inherited_options: + - option: help + shorthand: h + value_type: bool + default_value: "false" + description: Print usage or runx image/action documentation + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false deprecated: false hidden: false experimental: false diff --git a/docs/reference/runx.md b/docs/reference/runx.md index 0a2b1a4..5fd5de7 100644 --- a/docs/reference/runx.md +++ b/docs/reference/runx.md @@ -5,12 +5,11 @@ Docker Run, better ### Subcommands -| Name | Description | -|:-------------------------------|:-------------------------------------------------| -| [`cache`](runx_cache.md) | Manage Docker RunX cache and temporary files | -| [`decorate`](runx_decorate.md) | Decorate an image by attaching a runx manifest | -| [`help`](runx_help.md) | Display information about the available commands | -| [`version`](runx_version.md) | Show Docker RunX version information | +| Name | Description | +|:-------------------------------|:-----------------------------------------------| +| [`cache`](runx_cache.md) | Manage Docker RunX cache and temporary files | +| [`decorate`](runx_decorate.md) | Decorate an image by attaching a runx manifest | +| [`version`](runx_version.md) | Show Docker RunX version information | ### Options @@ -18,7 +17,7 @@ Docker Run, better | Name | Type | Default | Description | |:---------------|:--------------|:--------|:------------------------------------------------------------------| | `--ask` | `bool` | | Do not read local configuration option values and always ask them | -| `-d`, `--docs` | `bool` | | Print the documentation of the image | +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | | `-l`, `--list` | `bool` | | List available actions | | `--opt` | `stringArray` | | Set an option value | | `-y`, `--yes` | `bool` | | Do not check flags before running the command | diff --git a/docs/reference/runx_cache.md b/docs/reference/runx_cache.md index 49eadde..5e4a68d 100644 --- a/docs/reference/runx_cache.md +++ b/docs/reference/runx_cache.md @@ -11,6 +11,12 @@ Manage Docker RunX cache and temporary files | [`prune`](runx_cache_prune.md) | Remove cache entries not accessed recently | +### Options + +| Name | Type | Default | Description | +|:---------------|:-------|:--------|:-----------------------------------------------| +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | + diff --git a/docs/reference/runx_cache_df.md b/docs/reference/runx_cache_df.md index 698b71c..09a9dee 100644 --- a/docs/reference/runx_cache_df.md +++ b/docs/reference/runx_cache_df.md @@ -3,6 +3,12 @@ Show disk usage +### Options + +| Name | Type | Default | Description | +|:---------------|:-------|:--------|:-----------------------------------------------| +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | + diff --git a/docs/reference/runx_cache_prune.md b/docs/reference/runx_cache_prune.md index c977827..b19865e 100644 --- a/docs/reference/runx_cache_prune.md +++ b/docs/reference/runx_cache_prune.md @@ -5,10 +5,11 @@ By default remove cache entries not accessed in the last 30 days. Use --all/-a t ### Options -| Name | Type | Default | Description | -|:----------------|:-------|:--------|:-------------------------------| -| `-a`, `--all` | `bool` | | Remove all cache entries | -| `-f`, `--force` | `bool` | | Do not prompt for confirmation | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-----------------------------------------------| +| `-a`, `--all` | `bool` | | Remove all cache entries | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | diff --git a/docs/reference/runx_decorate.md b/docs/reference/runx_decorate.md index 67c3473..026a554 100644 --- a/docs/reference/runx_decorate.md +++ b/docs/reference/runx_decorate.md @@ -7,6 +7,7 @@ Decorate an image by attaching a runx manifest | Name | Type | Default | Description | |:----------------|:---------|:------------|:------------------------------------------------| +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | | `--no-config` | `bool` | | Do not attach a runx configuration to the image | | `--no-readme` | `bool` | | Do not attach a README to the image | | `-t`, `--tag` | `string` | | Tag to push the decorated image to | diff --git a/docs/reference/runx_version.md b/docs/reference/runx_version.md index 7a6675c..1156b04 100644 --- a/docs/reference/runx_version.md +++ b/docs/reference/runx_version.md @@ -3,6 +3,12 @@ Show Docker RunX version information +### Options + +| Name | Type | Default | Description | +|:---------------|:-------|:--------|:-----------------------------------------------| +| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation | + diff --git a/internal/runx/md.go b/internal/runx/md.go index eb0dd6a..48bea65 100644 --- a/internal/runx/md.go +++ b/internal/runx/md.go @@ -79,7 +79,7 @@ func MDActions(rk *runkit.RunKit) string { } } - s.WriteString("\n> Use `docker runx IMAGE ACTION --docs` to get more details about an action\n") + s.WriteString("\n> Use `docker runx IMAGE ACTION --help` to get more details about an action\n") } return s.String()