Skip to content

Commit 61c13e4

Browse files
committed
docs(docs/README): add the instructions to activate the auto-completion for cz in README.md
137 test(tests/test_cli): add a missing dependency 137
1 parent bf56194 commit 61c13e4

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

docs/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,32 @@ commands:
144144
current project (default: installed commitizen)
145145
```
146146

147+
## Setting up bash completion
148+
149+
When using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use [argcomplete](https://kislyuk.github.io/argcomplete/) for auto-completion. For this argcomplete needs to be enabled.
150+
151+
argcomplete is installed when you install Commitizen since it's a dependency.
152+
153+
If Commitizen is installed globally, global activation can be executed:
154+
155+
```bash
156+
sudo activate-global-python-argcomplete
157+
```
158+
159+
For permanent (but not global) Commitizen activation, use:
160+
161+
```bash
162+
register-python-argcomplete cz >> ~/.bashrc
163+
```
164+
165+
For one-time activation of argcomplete for Commitizen only, use:
166+
167+
```bash
168+
eval "$(register-python-argcomplete cz)"
169+
```
170+
171+
For further information on activation, please visit the [argcomplete website](https://kislyuk.github.io/argcomplete/).
172+
147173
## Third-Party Commitizen Templates
148174

149175
See [Third-Party Commitizen Templates](third-party-commitizen.md).

tests/test_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import sys
21
import subprocess
2+
import sys
33

44
import pytest
55

0 commit comments

Comments
 (0)