commitizen / commitizen/cz-cli

add visual aids to indicate exhaustion of options

Open
#784 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.5k
Forks
566
Avg merge
8h 16m
Merged PRs (30d)
1

Description

When I scroll all the way down to `revert`, it cycles down to `feat`. I can't easily figure out if I've exhausted all the options

This is from the perspective of a new user.

I would love to see one of two changes:

## Option One

Pressing down at the bottom places the cursor with `feat` at the _top of the list_. Currently it selects `feat` but without doesn't indicate that it's the end of available options.

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

## Option 2

Add a blank line at the end to signify we're at the end of possible options.

```
? Select the type of change that you're committing: (Use arrow keys)
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding missing tests or correcting existing tests
build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
chore: Other changes that don't modify src or test files
❯ revert: Reverts a previous commit
```

```
? Select the type of change that you're committing: (Use arrow keys)
perf: A code change that improves performance
test: Adding missing tests or correcting existing tests
build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
chore: Other changes that don't modify src or test files
revert: Reverts a previous commit

❯ feat: A new feature
fix: A bug fix
docs: Documentation only changes
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.