浏览代码

Merge pull request #614 from ThomasWaldmann/list-short-repo

implement --short for borg list REPO, fixes #611
TW 9 年之前
父节点
当前提交
68157d63fe
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      borg/archiver.py

+ 4 - 1
borg/archiver.py

@@ -474,7 +474,10 @@ class Archiver:
             for archive_info in manifest.list_archive_infos(sort_by='ts'):
                 if args.prefix and not archive_info.name.startswith(args.prefix):
                     continue
-                print(format_archive(archive_info))
+                if args.short:
+                    print(archive_info.name)
+                else:
+                    print(format_archive(archive_info))
         return self.exit_code
 
     def do_info(self, args):