Use the generate CLI reference.
This commit is contained in:
		
							parent
							
								
									5bb3a282c3
								
							
						
					
					
						commit
						82cbc580dc
					
				|  | @ -0,0 +1,42 @@ | ||||||
|  | This file is automatically generated using the cli-reference subcommand. | ||||||
|  | Use `cargo run -- cli-reference` to generate it. | ||||||
|  | 
 | ||||||
|  | // ANCHOR: install | ||||||
|  | $ hooked install --help | ||||||
|  | Install Hooked into ".git/hooks" | ||||||
|  | 
 | ||||||
|  | Usage: hooked install [OPTIONS] | ||||||
|  | 
 | ||||||
|  | Options: | ||||||
|  |       --overwrite        Overwrite existing files | ||||||
|  |   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] | ||||||
|  |   -h, --help             Print help information | ||||||
|  |   -V, --version          Print version information | ||||||
|  | // ANCHOR_END: install | ||||||
|  | // ANCHOR: run | ||||||
|  | $ hooked run --help | ||||||
|  | Manually run hooks | ||||||
|  | 
 | ||||||
|  | Usage: hooked run [OPTIONS] <HOOK_TYPE> | ||||||
|  | 
 | ||||||
|  | Arguments: | ||||||
|  |   <HOOK_TYPE>  The hook type to run [possible values: pre-commit] | ||||||
|  | 
 | ||||||
|  | Options: | ||||||
|  |   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] | ||||||
|  |   -h, --help             Print help information | ||||||
|  |   -V, --version          Print version information | ||||||
|  | // ANCHOR_END: run | ||||||
|  | // ANCHOR: uninstall | ||||||
|  | $ hooked uninstall --help | ||||||
|  | Remove installed hooks | ||||||
|  | 
 | ||||||
|  | Usage: hooked uninstall [OPTIONS] | ||||||
|  | 
 | ||||||
|  | Options: | ||||||
|  |       --all              Remove hooks not installed by Hooked | ||||||
|  |   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] | ||||||
|  |   -h, --help             Print help information | ||||||
|  |   -V, --version          Print version information | ||||||
|  | // ANCHOR_END: uninstall | ||||||
|  | 
 | ||||||
|  | @ -3,16 +3,7 @@ | ||||||
| The `install` command creates the scripts inside `.git/hooks`. | The `install` command creates the scripts inside `.git/hooks`. | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| $ hooked install --help | {{#include ../cli-reference.txt:install}} | ||||||
| Install Hooked into ".git/hooks" |  | ||||||
| 
 |  | ||||||
| Usage: hooked install [OPTIONS] |  | ||||||
| 
 |  | ||||||
| Options: |  | ||||||
|       --overwrite        Overwrite existing files |  | ||||||
|   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] |  | ||||||
|   -h, --help             Print help information |  | ||||||
|   -V, --version          Print version information |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Below is the default script template that Hooked uses, where `hook_type` is the type of hook to run (like `pre-commit`) and `config_path` is the `general.config` field from the parsed configuration. | Below is the default script template that Hooked uses, where `hook_type` is the type of hook to run (like `pre-commit`) and `config_path` is the `general.config` field from the parsed configuration. | ||||||
|  |  | ||||||
|  | @ -2,17 +2,6 @@ | ||||||
| 
 | 
 | ||||||
| The `run` command manually runs configured hooks. | The `run` command manually runs configured hooks. | ||||||
| 
 | 
 | ||||||
| ``` | ```sh | ||||||
| $ hooked run --help | {{#include ../cli-reference.txt:run}} | ||||||
| Manually run hooks |  | ||||||
| 
 |  | ||||||
| Usage: hooked run [OPTIONS] <HOOK_TYPE> |  | ||||||
| 
 |  | ||||||
| Arguments: |  | ||||||
|   <HOOK_TYPE>  The hook type to run [possible values: pre-commit] |  | ||||||
| 
 |  | ||||||
| Options: |  | ||||||
|   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] |  | ||||||
|   -h, --help             Print help information |  | ||||||
|   -V, --version          Print version information |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | @ -3,16 +3,7 @@ | ||||||
| The `uninstall` command removes script files inside `.git/hooks`. | The `uninstall` command removes script files inside `.git/hooks`. | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| hooked uninstall --help | {{#include ../cli-reference.txt:uninstall}} | ||||||
| Remove installed hooks |  | ||||||
| 
 |  | ||||||
| Usage: hooked uninstall [OPTIONS] |  | ||||||
| 
 |  | ||||||
| Options: |  | ||||||
|       --all              Remove hooks not installed by Hooked |  | ||||||
|   -c, --config <CONFIG>  Path to a Hooked configuration [default: Hooked.toml] |  | ||||||
|   -h, --help             Print help information |  | ||||||
|   -V, --version          Print version information |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| By default Hooked will only remove scripts that have a `# Installed by Hooked.` line in them, using `--all` however will remove all script files. | By default Hooked will only remove scripts that have a `# Installed by Hooked.` line in them, using `--all` however will remove all script files. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue