summaryrefslogtreecommitdiffstats
path: root/docs/Custom_Command_Keybindings.md
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-05-17 19:04:21 +0200
committerStefan Haller <stefan@haller-berlin.de>2024-05-19 09:44:38 +0200
commit6afcc5bda8bbe9d9976fd50740564fe201c3ea41 (patch)
tree20b3ebd4fbe0f1e03613af494ec5a9fd0c51c94c /docs/Custom_Command_Keybindings.md
parent9fc7a5177bf3a924527fb7172da8ce9407b65bd2 (diff)
Create shims for all model classes in SessionStateLoader
This guards against accidentally renaming a model field and thereby breaking user's custom commands. With this change we'll get a build failure when we do that.
Diffstat (limited to 'docs/Custom_Command_Keybindings.md')
-rw-r--r--docs/Custom_Command_Keybindings.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/Custom_Command_Keybindings.md b/docs/Custom_Command_Keybindings.md
index 8604a5247..426d6f8f6 100644
--- a/docs/Custom_Command_Keybindings.md
+++ b/docs/Custom_Command_Keybindings.md
@@ -305,7 +305,7 @@ SelectedWorktree
CheckedOutBranch
```
-To see what fields are available on e.g. the `SelectedFile`, see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/models/file.go) (all the modelling lives in the same directory). Note that the custom commands feature does not guarantee backwards compatibility (until we hit Lazygit version 1.0 of course) which means a field you're accessing on an object may no longer be available from one release to the next. Typically however, all you'll need is `{{.SelectedFile.Name}}`, `{{.SelectedLocalCommit.Hash}}` and `{{.SelectedLocalBranch.Name}}`. In the future we will likely introduce a tighter interface that exposes a limited set of fields for each model.
+To see what fields are available on e.g. the `SelectedFile`, see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/gui/services/custom_commands/models.go) (all the modelling lives in the same file).
## Keybinding collisions