Skip to content

Commit

Permalink
[cli] Add --show-dirs option to print install directory
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod committed Jun 2, 2020
1 parent 8ad6cd1 commit 2b2e91f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions legendary/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def list_installed(self, args):

print(f' * {game.title} (App name: {game.app_name} | Version: {game.version} | '
f'{game.install_size / (1024*1024*1024):.02f} GiB)')
if args.include_dir:
print(f' + Location: {game.install_path}')
if versions[game.app_name] != game.version:
print(f' -> Update available! Installed: {game.version}, Latest: {versions[game.app_name]}')

Expand Down Expand Up @@ -1074,6 +1076,8 @@ def main():
help='List games in CSV format')
list_installed_parser.add_argument('--tsv', dest='tsv', action='store_true',
help='List games in TSV format')
list_installed_parser.add_argument('--show-dirs', dest='include_dir', action='store_true',
help='Print installation directory in output')

list_files_parser.add_argument('--force-download', dest='force_download', action='store_true',
help='Always download instead of using on-disk manifest')
Expand Down

0 comments on commit 2b2e91f

Please sign in to comment.