diff --git a/docs/src/reference-main-then-chaining.md.in b/docs/src/reference-main-then-chaining.md.in index 293124aa2..1f8cd81c7 100644 --- a/docs/src/reference-main-then-chaining.md.in +++ b/docs/src/reference-main-then-chaining.md.in @@ -21,3 +21,5 @@ GENMD-INCLUDE-ESCAPED(data/then-chaining-performance.txt) There are two reasons to use then-chaining: one is for performance, although I don't expect this to be a win in all cases. Using then-chaining avoids redundant string-parsing and string-formatting at each pipeline step: instead input records are parsed once, they are fed through each pipeline stage in memory, and then output records are formatted once. The other reason to use then-chaining is for simplicity: you don't have re-type formatting flags (e.g. `--csv --fs tab`) at every pipeline stage. + +As of Miller 6.3.0, `+` is an alias for `then`. diff --git a/internal/pkg/climain/mlrcli_parse.go b/internal/pkg/climain/mlrcli_parse.go index df24b2c64..2ae365968 100644 --- a/internal/pkg/climain/mlrcli_parse.go +++ b/internal/pkg/climain/mlrcli_parse.go @@ -162,10 +162,10 @@ func parseCommandLinePassOne( os.Exit(1) } - } else if onFirst || args[argi] == "then" { + } else if onFirst || args[argi] == "then" || args[argi] == "+" { // The first verb in the then-chain can *optionally* be preceded by // 'then'. The others one *must* be. - if args[argi] == "then" { + if args[argi] == "then" || args[argi] == "+" { cli.CheckArgCount(args, argi, argc, 1) oargi++ argi++