Skip to content

Commit

Permalink
fixup! fixup! Issue #20 add support for tar files too
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Dec 17, 2022
1 parent 451b96c commit 7eb39f5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions duviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,13 @@ def main():
cli = argparse.ArgumentParser(
prog="duviz", description="Render ASCII-art representation of disk space usage."
)
cli.add_argument("dir", nargs="*", help="directories to scan", default=["."])
cli.add_argument(
"paths",
metavar="PATH",
nargs="*",
help="Directories or ZIP/tar archives to scan",
default=["."],
)
cli.add_argument(
"-w",
"--width",
Expand Down Expand Up @@ -648,7 +654,7 @@ def main():

# Make sure we have a valid list of paths
paths: List[str] = []
for path in args.dir:
for path in args.paths:
if os.path.exists(path):
paths.append(path)
else:
Expand Down

0 comments on commit 7eb39f5

Please sign in to comment.