Commit ea6116d
committed
make hooks messages configurable
...and update them to reflect current usage
why:
- these messages appeared to be just wrong (referencing `aide` instead of firstaide or an `update` command that doesn't appear to exist)
- and in any case it's nice to have them all customizeable not just the getting_started message. based on the presence of the `Messages` struct I presume this was always intended
how:
- add fields to `Messages` struct, named based on the hook they are associated with
- set sensible defaults for messages
- use serde default attributes to allow mixing defaults and custom messages without errors
- add messages to the hooks scripts
- splat configured messages into hooks scripts based on how it was done for the getting_started message
docs: updated the readme to document messages configuration
validation: tested new message configurations in a different project, `cargo test`1 parent cca838c commit ea6116d
1 file changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| |||
0 commit comments