From 09ece70b12e4143bc4c9bdc438526510ced16b01 Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Mon, 27 Jan 2025 11:05:57 +0100 Subject: [PATCH] chore: add lazygit config to readme and example config to repo docs: typo --- README.md | 24 ++++++++++++++++++++++++ lazygit_config/config.yml | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 lazygit_config/config.yml diff --git a/README.md b/README.md index d44044e..aa704fc 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,30 @@ $ cocommit cz -c ``` This should allow for all the same utility as the normal CLI mode in terms of author selection +### Lazygit Config +If you use lazygit you can add the following to your lazygit config file to use cocommit: +``` +customCommands: + - key: '' + context: 'global' + showOutput: true + prompts: + - type: 'input' + title: 'Commit message' + key: 'message' + initialValue: '' + - type: 'input' + title: 'Authors' + key: 'authors' + initialValue: '' + command: 'cocommit -p "{{.Form.message}}" {{.Form.authors}}' + - key: '' + context: 'global' + subprocess: true + command: 'cocommit -p; exit' +``` +A sample lazygit config file can be found [here](https://github.com/Slug-Boi/cocommit/blob/main/lazygit_config/config.yml) + # Syntax for the author file The syntax for the author file can be found at the top of the template file included in the repo. It should look like this (opt) is optional syntax: ``` diff --git a/lazygit_config/config.yml b/lazygit_config/config.yml new file mode 100644 index 0000000..06d039b --- /dev/null +++ b/lazygit_config/config.yml @@ -0,0 +1,18 @@ +customCommands: + - key: '' + context: 'global' + showOutput: true + prompts: + - type: 'input' + title: 'Commit message' + key: 'message' + initialValue: '' + - type: 'input' + title: 'Authors' + key: 'authors' + initialValue: '' + command: 'cocommit -p "{{.Form.message}}" {{.Form.authors}}' + - key: '' + context: 'global' + subprocess: true + command: 'cocommit -p; exit'