浏览代码

list: fix --pattern examples, fixes #7611

- pattern needs to start with + - !
- first match wins
- the default is to list everything, thus a 2nd pattern
  is needed to exclude everything not matched by 1st pattern.
Thomas Waldmann 1 年之前
父节点
当前提交
81c3cb957e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      docs/usage/list.rst

+ 2 - 2
docs/usage/list.rst

@@ -27,11 +27,11 @@ Examples
     -rw-rw-r-- user   user    1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.text
     ...
 
-    $ borg list archiveA --pattern 're:\.ext$'
+    $ borg list archiveA --pattern '+ re:\.ext$' --pattern '- re:^.*$'
     -rw-rw-r-- user   user    1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.ext
     ...
 
-    $ borg list archiveA --pattern 're:.ext$'
+    $ borg list archiveA --pattern '+ re:.ext$' --pattern '- re:^.*$'
     -rw-rw-r-- user   user    1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.ext
     -rw-rw-r-- user   user    1416192 Sun, 2015-02-01 11:00:00 code/myproject/file.text
     ...