Skip to content

Commit

Permalink
Update docs for optional field
Browse files Browse the repository at this point in the history
  • Loading branch information
andriygm authored Jul 3, 2024
1 parent e8131b8 commit dc620a5
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,34 @@ To manage hook command sequences, create a single hook that runs a shell command

```toml
[[hooks]]
name = "create file"
key = "create_file"
command = ["bash", "-c", "touch new_file && chmod +x new_file"]
```
### key `string`

### name `string`

The name of the hook.
The identifier for the hook.

### command `string[]`

The command to execute. The first element is the command and the rest are arguments.

### optional

When defined, the user can toggle the hook. `default` describes the default state of the hook.

```
optional = { default = true }
```

### if `string`

The condition to execute the hook. The condition is templated just like the template files, allowing you to conditionally execute a hook.

### name `string`

The name of the hook.

### description `string`

A description for the hook.

0 comments on commit dc620a5

Please sign in to comment.