mainrs / mainrs/git-cm

Add support for keyboard shortcuts on multi-selection menus

Open
#8 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
101
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Currently, running `git cm` offers a quite lengthy menu:

```
$ git cm
? Select the type of change that you're committing: ›
❯ feat: A new feature
test: Adding missing tests or correcting existing tests
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, GitHub Actions)
build: Changes that affect the build system or external dependencies (example scopes: cargo, bazel, make)
style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
chore: Other changes that don't modify src or test files
perf: A code change that improves performance
fix: A bug fix
revert: Reverts a previous commit
docs: Documentation only changes
refactor: A code change that neither fixes a bug nor adds a feature
```

Being able to instantly select one with a key-press would make it really faster to use.

I'm thinking about some letter hints, which are indicated by a line below the relevant character.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the `git cm` entry point and trace how the multi-selection menu receives keyboard input. Confirm how menu items are represented and how selection is tested or manually exercised. Done means letter hints are shown for the relevant characters and pressing a hint immediately selects the corresponding commit type.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.