Skip to content

Feature Request: Add search/filter functionality to keybindings menu #4846

@ProdigyRahul

Description

@ProdigyRahul

Is your feature request related to a problem? Please describe.

I'm frustrated when I need to find a specific keybinding in the keybindings menu (?). Currently, I have to manually scroll through the entire list of
commands to find what I'm looking for. With lazygit having so many features and keybindings, this becomes time-consuming and makes it harder to
discover features or quickly reference forgotten shortcuts.

Describe the solution you'd like

Add a search/filter functionality to the keybindings menu that allows users to:

  • Start typing immediately after pressing ? to filter commands in real-time
  • Search by command name, description, or the actual keybinding
  • See filtered results instantly with matching text highlighted
  • Clear the search with Esc to show all keybindings again
  • Similar to how the / filter works in branches/files views

Describe alternatives you've considered

  1. External documentation - Keeping the keybindings docs open in another window, but this breaks the workflow
  2. Custom command - Could potentially create a custom command that greps through keybindings, but this wouldn't integrate well with the existing UI
  3. Memorization - Just memorizing all keybindings, but this is impractical for occasional users or less common commands

Additional context

This would work similarly to:

  • VSCode's Command Palette (Ctrl+Shift+P)
  • The existing filter functionality already present in lazygit's branches view (/ to filter)
  • Other TUI apps like k9s that have searchable command palettes

Example use cases:

  • Type "stash" to quickly see all stash-related commands
  • Type "ctrl" to see all Ctrl-based shortcuts
  • Type "rebase" to discover all rebase options available

This would significantly improve discoverability and make lazygit more user-friendly, especially for users learning its extensive feature set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions