added version flag and its output
This commit is contained in:
@@ -9,5 +9,6 @@ again.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
<2025-09-27> - Beta b0.1.1 - added the version output<br>
|
||||||
<2025-09-27> - Beta b0.1.1 - fixed verbosity switch for subprocess<br>
|
<2025-09-27> - Beta b0.1.1 - fixed verbosity switch for subprocess<br>
|
||||||
<2025-09-27> - *Beta b0.0.1* - first release of tempbox
|
<2025-09-27> - *Beta b0.0.1* - first release of tempbox
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import argparse
|
|||||||
|
|
||||||
from tempbox_functions import execute_as_subprocess
|
from tempbox_functions import execute_as_subprocess
|
||||||
|
|
||||||
|
tempbox_version = "Tempbox Beta b0.1.1"
|
||||||
# Argument parsing
|
# Argument parsing
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="Tempbox",
|
prog="Tempbox",
|
||||||
@@ -25,6 +25,8 @@ parser.add_argument(
|
|||||||
help="Takes the string right after the flag to execute it.",
|
help="Takes the string right after the flag to execute it.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument("-V", "--version", action="version", version=tempbox_version)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.command is not None:
|
if args.command is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user