We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8d00fd commit b856aefCopy full SHA for b856aef
1 file changed
src/commit_editor/cli.py
@@ -1,5 +1,6 @@
1
import argparse
2
import sys
3
+from importlib.metadata import version
4
from pathlib import Path
5
6
@@ -9,6 +10,12 @@ def main() -> int:
9
10
prog="commit-editor",
11
description="A terminal-based git commit message editor with opinionated formatting",
12
)
13
+ parser.add_argument(
14
+ "-V",
15
+ "--version",
16
+ action="version",
17
+ version=f"%(prog)s {version('commit-editor')}",
18
+ )
19
parser.add_argument(
20
"filename",
21
type=Path,
0 commit comments