Skip to content

Commit

Permalink
Fix #29 bring back CLI option --version
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Apr 17, 2023
1 parent 890b27f commit af8ddb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- Migrate to `pyproject.toml` based project metadata
and `hatchling` based packaging
([#15](https://github.com/soxofaan/duviz/issues/15))
- Bring back CLI option `--version` to show current version.
([#29](https://github.com/soxofaan/duviz/issues/29))


## [3.2.0] - 2022-12-18
Expand Down
4 changes: 3 additions & 1 deletion duviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,10 @@ def main():

# Handle commandline interface.
cli = argparse.ArgumentParser(
prog="duviz", description="Render ASCII-art representation of disk space usage."
prog="duviz",
description="Render ASCII-art representation of disk space usage.",
)
cli.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
cli.add_argument(
"paths",
metavar="PATH",
Expand Down

0 comments on commit af8ddb0

Please sign in to comment.