Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -h/--help instead of -d/--docs to print help #22

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

Expand All @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions docs/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

Expand All @@ -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.

Expand Down
13 changes: 11 additions & 2 deletions docs/reference/docker_runx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/docker_runx_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/docker_runx_cache_df.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/docker_runx_cache_prune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/docker_runx_decorate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/docker_runx_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions docs/reference/runx.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ 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

| 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 |
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/runx_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


<!---MARKER_GEN_END-->

6 changes: 6 additions & 0 deletions docs/reference/runx_cache_df.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<!---MARKER_GEN_START-->
Show disk usage

### Options

| Name | Type | Default | Description |
|:---------------|:-------|:--------|:-----------------------------------------------|
| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation |


<!---MARKER_GEN_END-->

9 changes: 5 additions & 4 deletions docs/reference/runx_cache_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


<!---MARKER_GEN_END-->
Expand Down
1 change: 1 addition & 0 deletions docs/reference/runx_decorate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/runx_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<!---MARKER_GEN_START-->
Show Docker RunX version information

### Options

| Name | Type | Default | Description |
|:---------------|:-------|:--------|:-----------------------------------------------|
| `-h`, `--help` | `bool` | | Print usage or runx image/action documentation |


<!---MARKER_GEN_END-->

23 changes: 0 additions & 23 deletions internal/commands/help/help.go

This file was deleted.

Loading
Loading