mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
Add field Alternative to gui.Binding
Document and use alternative keybinding for generating cheatsheet. Add alt keybinding fn+up/down for scroll up/down actions. Also run `go run scripts/generate_cheatsheet.go`.
This commit is contained in:
parent
357b8fa98f
commit
97f060d38d
5 changed files with 50 additions and 32 deletions
|
@ -59,6 +59,9 @@ func formatTitle(title string) string {
|
|||
}
|
||||
|
||||
func formatBinding(binding *gui.Binding) string {
|
||||
if binding.Alternative != "" {
|
||||
return fmt.Sprintf(" <kbd>%s</kbd>: %s (%s)\n", binding.GetKey(), binding.Description, binding.Alternative)
|
||||
}
|
||||
return fmt.Sprintf(" <kbd>%s</kbd>: %s\n", binding.GetKey(), binding.Description)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue