From 7fe96e9aee7f38c626a2e00658cab1897d6afef1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 19 Jul 2025 12:09:46 +0200 Subject: [PATCH] Include commands without keybinding in options menu This is not a behavior change, we already include these in the menu, but that's because of a bug that we will fix in the next commit. I find it useful to see these commands, especially for rarely-used custom commands that you don't want to waste a keybinding on. --- pkg/gui/controllers/options_menu_action.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/gui/controllers/options_menu_action.go b/pkg/gui/controllers/options_menu_action.go index 8e3f1db9b..2e35af153 100644 --- a/pkg/gui/controllers/options_menu_action.go +++ b/pkg/gui/controllers/options_menu_action.go @@ -1,7 +1,6 @@ package controllers import ( - "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" @@ -61,7 +60,7 @@ func (self *OptionsMenuAction) getBindings(context types.Context) ([]*types.Bind bindings, _ := self.c.GetInitialKeybindingsWithCustomCommands() for _, binding := range bindings { - if keybindings.LabelFromKey(binding.Key) != "" && binding.Description != "" { + if binding.Description != "" { if binding.ViewName == "" { bindingsGlobal = append(bindingsGlobal, binding) } else if binding.ViewName == context.GetViewName() {