فهرست منبع

docs: list: fix unintended block quote

Marian Beermann 8 سال پیش
والد
کامیت
125b02c5c8
2فایلهای تغییر یافته به همراه61 افزوده شده و 69 حذف شده
  1. 49 57
      docs/usage/list.rst.inc
  2. 12 12
      src/borg/helpers.py

+ 49 - 57
docs/usage/list.rst.inc

@@ -67,66 +67,58 @@ See the "borg help patterns" command for more help on exclude patterns.
 
 
 The following keys are available for ``--format``:
 The following keys are available for ``--format``:
 
 
- - NEWLINE: OS dependent line separator
- - NL: alias of NEWLINE
- - NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
- - SPACE
- - TAB
- - CR
- - LF
+- NEWLINE: OS dependent line separator
+- NL: alias of NEWLINE
+- NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
+- SPACE
+- TAB
+- CR
+- LF
 
 
 Keys for listing repository archives:
 Keys for listing repository archives:
 
 
- - archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)
- - barchive: verbatim archive name, can contain any character except NUL
- - time: time of creation of the archive
- - id: internal ID of the archive
+- archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)
+- barchive: verbatim archive name, can contain any character except NUL
+- time: time of creation of the archive
+- id: internal ID of the archive
 
 
 Keys for listing archive files:
 Keys for listing archive files:
 
 
- - type
- - mode
- - uid
- - gid
- - user
- - group
- - path: path interpreted as text (might be missing non-text characters, see bpath)
- - bpath: verbatim POSIX path, can contain any character except NUL
- - source: link target for links (identical to linktarget)
- - linktarget
- - flags
-
- - size
- - csize: compressed size
- - dsize: deduplicated size
- - dcsize: deduplicated compressed size
- - num_chunks: number of chunks in this file
- - unique_chunks: number of unique chunks in this file
-
- - mtime
- - ctime
- - atime
- - isomtime
- - isoctime
- - isoatime
-
- - blake2b
- - blake2s
- - md5
- - sha1
- - sha224
- - sha256
- - sha384
- - sha3_224
- - sha3_256
- - sha3_384
- - sha3_512
- - sha512
- - shake_128
- - shake_256
-
- - archiveid
- - archivename
- - extra: prepends {source} with " -> " for soft links and " link to " for hard links
-
- - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)
+- type
+- mode
+- uid
+- gid
+- user
+- group
+- path: path interpreted as text (might be missing non-text characters, see bpath)
+- bpath: verbatim POSIX path, can contain any character except NUL
+- source: link target for links (identical to linktarget)
+- linktarget
+- flags
+
+- size
+- csize: compressed size
+- dsize: deduplicated size
+- dcsize: deduplicated compressed size
+- num_chunks: number of chunks in this file
+- unique_chunks: number of unique chunks in this file
+
+- mtime
+- ctime
+- atime
+- isomtime
+- isoctime
+- isoatime
+
+- md5
+- sha1
+- sha224
+- sha256
+- sha384
+- sha512
+
+- archiveid
+- archivename
+- extra: prepends {source} with " -> " for soft links and " link to " for hard links
+
+- health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)

+ 12 - 12
src/borg/helpers.py

@@ -1507,13 +1507,13 @@ class BaseFormatter:
 
 
     @staticmethod
     @staticmethod
     def keys_help():
     def keys_help():
-        return " - NEWLINE: OS dependent line separator\n" \
-               " - NL: alias of NEWLINE\n" \
-               " - NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath\n" \
-               " - SPACE\n" \
-               " - TAB\n" \
-               " - CR\n" \
-               " - LF"
+        return "- NEWLINE: OS dependent line separator\n" \
+               "- NL: alias of NEWLINE\n" \
+               "- NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath\n" \
+               "- SPACE\n" \
+               "- TAB\n" \
+               "- CR\n" \
+               "- LF"
 
 
 
 
 class ArchiveFormatter(BaseFormatter):
 class ArchiveFormatter(BaseFormatter):
@@ -1535,10 +1535,10 @@ class ArchiveFormatter(BaseFormatter):
 
 
     @staticmethod
     @staticmethod
     def keys_help():
     def keys_help():
-        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" \
-               " - time: time of creation of the archive\n" \
-               " - id: internal ID of the archive"
+        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" \
+               "- time: time of creation of the archive\n" \
+               "- id: internal ID of the archive"
 
 
 
 
 class ItemFormatter(BaseFormatter):
 class ItemFormatter(BaseFormatter):
@@ -1590,7 +1590,7 @@ class ItemFormatter(BaseFormatter):
         for group in cls.KEY_GROUPS:
         for group in cls.KEY_GROUPS:
             for key in group:
             for key in group:
                 keys.remove(key)
                 keys.remove(key)
-                text = " - " + key
+                text = "- " + key
                 if key in cls.KEY_DESCRIPTIONS:
                 if key in cls.KEY_DESCRIPTIONS:
                     text += ": " + cls.KEY_DESCRIPTIONS[key]
                     text += ": " + cls.KEY_DESCRIPTIONS[key]
                 help.append(text)
                 help.append(text)