Skip to content

Commit

Permalink
Add --version
Browse files Browse the repository at this point in the history
Fixes #48
  • Loading branch information
asmacdo committed Jun 7, 2024
1 parent 84f08fd commit be338d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/duct.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ def create_and_parse_args():
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument("command", help="The command to execute.")
parser.add_argument(
"--version", action="version", version=f"%(prog)s {__version__}"
)
parser.add_argument(
"inner_args", nargs=argparse.REMAINDER, help="Arguments for the command."
)
Expand Down

0 comments on commit be338d0

Please sign in to comment.