Skip to content

Commit 908c912

Browse files
committed
Add version printout
1 parent be2a78e commit 908c912

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

puremagic/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from itertools import chain
2020
from pathlib import Path
2121

22+
import puremagic
23+
2224
if os.getenv("PUREMAGIC_DEEPSCAN") != "0":
2325
from puremagic.scanners import zip_scanner, pdf_scanner, text_scanner, json_scanner, python_scanner
2426

@@ -485,8 +487,9 @@ def command_line_entry(*args):
485487
dest="mime",
486488
help="Return the mime type instead of file type",
487489
)
488-
parser.add_argument("-v", "--v", action="store_true", dest="verbose", help="Print verbose output")
490+
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", help="Print verbose output")
489491
parser.add_argument("files", nargs="+")
492+
parser.add_argument("--version", action="version", version=puremagic.__version__)
490493
args = parser.parse_args(args if args else sys.argv[1:])
491494

492495
for fn in args.files:

0 commit comments

Comments
 (0)