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.
This commit is contained in:
Thomas Waldmann 2023-06-27 21:00:05 +02:00
parent b37c38afa9
commit 81c3cb957e
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
1 changed files with 2 additions and 2 deletions

View File

@ -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
...