Skip to content

Add escape key to cancel branch selection screen #24

@ericanderson

Description

@ericanderson

Description

When using the interactive branch selection screen (where users choose which branches to delete), pressing the Escape key should cancel the operation and exit the selection interface.

Current Behavior

Currently, there is no keyboard shortcut to quickly cancel/exit the branch selection screen. Users must complete the selection process or use other methods to exit.

Expected Behavior

Pressing the Escape (ESC) key should:

  1. Cancel the current branch selection
  2. Exit the interactive selection screen
  3. Return to the command prompt without deleting any branches

Use Case

This would improve the user experience by providing a quick and intuitive way to cancel the operation if:

  • The user accidentally started the command
  • The user wants to abort after seeing the list of branches
  • The user needs to exit quickly without making changes

Possible Solution

Implement an escape key handler in the interactive branch selection interface that:

  • Listens for the ESC key press
  • Cancels the current operation
  • Provides feedback that the operation was cancelled
  • Exits gracefully

Additional Context

This is a common UX pattern in CLI tools with interactive interfaces, making the tool more user-friendly and following established conventions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions