Add the program version via 'nvd --version' and the man page.

This commit is contained in:
Bryan Gardiner 2021-05-16 17:07:05 -07:00
parent 95c7ab7070
commit 00495ddf25
No known key found for this signature in database
GPG key ID: 53EFBCA063E6183C
2 changed files with 9 additions and 1 deletions

View file

@ -48,6 +48,8 @@ from pathlib import Path
from subprocess import PIPE
from typing import Dict, List, Optional, Tuple, Union
NVD_VERSION = "0.1.0"
USE_COLOUR = False
SGR_RESET = 0
@ -588,6 +590,12 @@ def parse_args():
epilog="See the nvd(1) manual page for more information.",
)
parser.add_argument(
"--version",
action="version",
version=f"nvd {NVD_VERSION}",
)
parser.add_argument(
"--color",
default="auto",

View file

@ -1,4 +1,4 @@
.TH nvd 1 2021-05-16 nvd "User Commands"
.TH nvd 1 2021-05-16 nvd-0.1.0 "User Commands"
.SH NAME
nvd \- Nix/NixOS package version diff tool
.SH SYNOPSIS