| 1 |
Output cli_interactive/shortcut_custom.gif |
| 2 |
|
| 3 |
Source shared/base.tape |
| 4 |
Source shared/git_init.tape |
| 5 |
|
| 6 |
Type "git checkout -b awesome-docs" |
| 7 |
Enter |
| 8 |
Sleep 500ms |
| 9 |
|
| 10 |
Type `cat > pyproject.toml << 'EOF'` |
| 11 |
Enter |
| 12 |
Type `[tool.commitizen]` |
| 13 |
Enter |
| 14 |
Type `name = "cz_customize"` |
| 15 |
Enter |
| 16 |
Type `use_shortcuts = true` |
| 17 |
Enter |
| 18 |
Type `` |
| 19 |
Enter |
| 20 |
Type `[tool.commitizen.customize]` |
| 21 |
Enter |
| 22 |
Type `message_template = "{{prefix}}: {{message}}"` |
| 23 |
Enter |
| 24 |
Type `schema = "<type>: <body>"` |
| 25 |
Enter |
| 26 |
Type `schema_pattern = "(feat|fix|docs|test):(\\s.*)"` |
| 27 |
Enter |
| 28 |
Type `` |
| 29 |
Enter |
| 30 |
Type `[[tool.commitizen.customize.questions]]` |
| 31 |
Enter |
| 32 |
Type `type = "list"` |
| 33 |
Enter |
| 34 |
Type `name = "prefix"` |
| 35 |
Enter |
| 36 |
Type `message = "Select the type of change you are committing"` |
| 37 |
Enter |
| 38 |
Type `choices = [` |
| 39 |
Enter |
| 40 |
Type ` { value = "feat", name = "feat: A new feature.", key = "f" },` |
| 41 |
Enter |
| 42 |
Type ` { value = "fix", name = "fix: A bug fix.", key = "x" },` |
| 43 |
Enter |
| 44 |
Type ` { value = "docs", name = "docs: Documentation only changes", key = "d" },` |
| 45 |
Enter |
| 46 |
Type ` { value = "test", name = "test: Adding or correcting tests", key = "t" },` |
| 47 |
Enter |
| 48 |
Type `]` |
| 49 |
Enter |
| 50 |
Type `` |
| 51 |
Enter |
| 52 |
Type `[[tool.commitizen.customize.questions]]` |
| 53 |
Enter |
| 54 |
Type `type = "input"` |
| 55 |
Enter |
| 56 |
Type `name = "message"` |
| 57 |
Enter |
| 58 |
Type `message = "Commit body: "` |
| 59 |
Enter |
| 60 |
Type "EOF" |
| 61 |
Enter |
| 62 |
Sleep 300ms |
| 63 |
|
| 64 |
# Create a dummy file to commit |
| 65 |
Type "echo 'test content' > README.md" |
| 66 |
Enter |
| 67 |
Sleep 300ms |
| 68 |
|
| 69 |
Type "git add README.md" |
| 70 |
Enter |
| 71 |
Sleep 300ms |
| 72 |
|
| 73 |
# Clear the screen to start fresh |
| 74 |
Type "clear" |
| 75 |
Enter |
| 76 |
Sleep 500ms |
| 77 |
|
| 78 |
# Show commands from here |
| 79 |
Show |
| 80 |
|
| 81 |
# Now run cz commit |
| 82 |
Type "cz commit" |
| 83 |
Sleep 500ms |
| 84 |
Enter |
| 85 |
|
| 86 |
# Q1: prefix -- press "d" shortcut for "docs" |
| 87 |
Wait+Screen /Select the type of change/ |
| 88 |
Sleep 1s |
| 89 |
Type "d" |
| 90 |
Sleep 2s |
| 91 |
Enter |
| 92 |
|
| 93 |
# Q2: Commit body |
| 94 |
Wait+Screen /Commit body/ |
| 95 |
Sleep 500ms |
| 96 |
Type "demo with custom keys" |
| 97 |
Sleep 500ms |
| 98 |
Enter |
| 99 |
|
| 100 |
# Wait for commit success message |
| 101 |
Sleep 2s |
| 102 |
|
| 103 |
Source shared/cleanup.tape |