Explorar o código

list: add "name" key for consistency with info cmd

Marian Beermann %!s(int64=8) %!d(string=hai) anos
pai
achega
8cdf192511
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/borg/helpers.py

+ 2 - 1
src/borg/helpers.py

@@ -1558,6 +1558,7 @@ class ArchiveFormatter(BaseFormatter):
 
 
     def get_item_data(self, archive):
     def get_item_data(self, archive):
         return {
         return {
+            'name': remove_surrogates(archive.name),
             'barchive': archive.name,
             'barchive': archive.name,
             'archive': remove_surrogates(archive.name),
             'archive': remove_surrogates(archive.name),
             'id': bin_to_hex(archive.id),
             'id': bin_to_hex(archive.id),
@@ -1566,7 +1567,7 @@ class ArchiveFormatter(BaseFormatter):
 
 
     @staticmethod
     @staticmethod
     def keys_help():
     def keys_help():
-        return " - archive: archive name interpreted as text (might be missing non-text characters, see barchive)\n" \
+        return " - archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)\n" \
                " - barchive: verbatim archive name, can contain any character except NUL\n" \
                " - barchive: verbatim archive name, can contain any character except NUL\n" \
                " - time: time of creation of the archive\n" \
                " - time: time of creation of the archive\n" \
                " - id: internal ID of the archive"
                " - id: internal ID of the archive"