Add help strings for -a/-r in sub/gsub/ssub (#1721)

* Help strings for `-a`/`-r` in `sub`/`gsub`/`ssub`

* `mlr regtest -p test/cases/cli-help` to update expected outputs

* artifacts from `make dev`
This commit is contained in:
John Kerl 2024-11-23 10:13:36 -05:00 committed by GitHub
parent 5c65edba95
commit 9f77bbe096
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 51 additions and 10 deletions

View file

@ -49,6 +49,8 @@ func transformerSubUsage(
fmt.Fprintf(o, "See also the `gsub` and `ssub` verbs.\n")
fmt.Fprintf(o, "Options:\n")
fmt.Fprintf(o, "-f {a,b,c} Field names to convert.\n")
fmt.Fprintf(o, "-r {regex} Regular expression for field names to convert.\n")
fmt.Fprintf(o, "-a Convert all field names.\n")
fmt.Fprintf(o, "-h|--help Show this message.\n")
}
@ -61,6 +63,8 @@ func transformerGsubUsage(
fmt.Fprintf(o, "See also the `sub` and `ssub` verbs.\n")
fmt.Fprintf(o, "Options:\n")
fmt.Fprintf(o, "-f {a,b,c} Field names to convert.\n")
fmt.Fprintf(o, "-r {regex} Regular expression for field names to convert.\n")
fmt.Fprintf(o, "-a Convert all field names.\n")
fmt.Fprintf(o, "-h|--help Show this message.\n")
}
@ -72,6 +76,8 @@ func transformerSsubUsage(
fmt.Fprintf(o, "the old string, like the `ssub` DSL function. See also the `gsub` and `sub` verbs.\n")
fmt.Fprintf(o, "Options:\n")
fmt.Fprintf(o, "-f {a,b,c} Field names to convert.\n")
fmt.Fprintf(o, "-r {regex} Regular expression for field names to convert.\n")
fmt.Fprintf(o, "-a Convert all field names.\n")
fmt.Fprintf(o, "-h|--help Show this message.\n")
}