Skip to content

Commit e333537

Browse files
zevisertLee-W
authored andcommitted
refactor(shortcuts): move check for shortcut config setting to apply to any list select
1 parent 6820271 commit e333537

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

commitizen/commands/commit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def prompt_commit_questions(self) -> str:
4646
# Prompt user for the commit message
4747
cz = self.cz
4848
questions = cz.questions()
49+
for question in filter(lambda q: q['type'] == 'list', questions):
50+
question["use_shortcuts"] = self.config.settings["use_shortcuts"]
4951
try:
5052
answers = questionary.prompt(questions, style=cz.style)
5153
except ValueError as err:

commitizen/cz/conventional_commits/conventional_commits.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def questions(self) -> List[Dict[str, Any]]:
4545
"type": "list",
4646
"name": "prefix",
4747
"message": "Select the type of change you are committing",
48-
"use_shortcuts": self.config.settings["use_shortcuts"],
4948
"choices": [
5049
{
5150
"value": "fix",

0 commit comments

Comments
 (0)