mirror of
https://github.com/octoleo/restic.git
synced 2025-01-03 15:17:28 +00:00
Accept both singular and plural for --group-by (#2330)
This commit is contained in:
parent
26d1f9f4ba
commit
4d2aa18273
6
changelog/unreleased/issue-2330
Normal file
6
changelog/unreleased/issue-2330
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Enhancement: Make `--group-by` accept both singular and plural
|
||||||
|
|
||||||
|
One can now use the values `host`/`hosts`, `path`/`paths` and
|
||||||
|
`tag` / `tags` interchangeably in the `--group-by` argument.
|
||||||
|
|
||||||
|
https://github.com/restic/restic/issues/2330
|
@ -31,11 +31,11 @@ func GroupSnapshots(snapshots Snapshots, options string) (map[string]Snapshots,
|
|||||||
|
|
||||||
for _, option := range GroupOptionList {
|
for _, option := range GroupOptionList {
|
||||||
switch option {
|
switch option {
|
||||||
case "host":
|
case "host", "hosts":
|
||||||
GroupByHost = true
|
GroupByHost = true
|
||||||
case "paths":
|
case "path", "paths":
|
||||||
GroupByPath = true
|
GroupByPath = true
|
||||||
case "tags":
|
case "tag", "tags":
|
||||||
GroupByTag = true
|
GroupByTag = true
|
||||||
case "":
|
case "":
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user