From e3b98cd62188cd67e93dcaa0925c0876f461daa9 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 24 Dec 2023 12:43:26 -0500 Subject: [PATCH] On-line help info for `mlr join --lk ""` (#1458) * Doc info for `mlr join --lk ""` * make dev output --- docs/src/manpage.md | 2 ++ docs/src/manpage.txt | 2 ++ docs/src/reference-verbs.md | 2 ++ man/manpage.txt | 2 ++ man/mlr.1 | 2 ++ pkg/transformers/join.go | 2 ++ test/cases/cli-help/0001/expout | 2 ++ 7 files changed, 14 insertions(+) diff --git a/docs/src/manpage.md b/docs/src/manpage.md index 28182f146..47587dacb 100644 --- a/docs/src/manpage.md +++ b/docs/src/manpage.md @@ -1338,6 +1338,8 @@ MILLER(1) MILLER(1) --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from diff --git a/docs/src/manpage.txt b/docs/src/manpage.txt index 4262cc6c7..8f6810bf6 100644 --- a/docs/src/manpage.txt +++ b/docs/src/manpage.txt @@ -1317,6 +1317,8 @@ MILLER(1) MILLER(1) --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from diff --git a/docs/src/reference-verbs.md b/docs/src/reference-verbs.md index 9a50a1dbb..9e5fff6df 100644 --- a/docs/src/reference-verbs.md +++ b/docs/src/reference-verbs.md @@ -1671,6 +1671,8 @@ Options: --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from diff --git a/man/manpage.txt b/man/manpage.txt index 4262cc6c7..8f6810bf6 100644 --- a/man/manpage.txt +++ b/man/manpage.txt @@ -1317,6 +1317,8 @@ MILLER(1) MILLER(1) --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from diff --git a/man/mlr.1 b/man/mlr.1 index 04c2151e3..ae47df883 100644 --- a/man/mlr.1 +++ b/man/mlr.1 @@ -1662,6 +1662,8 @@ Options: --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from diff --git a/pkg/transformers/join.go b/pkg/transformers/join.go index 3d8547a12..deeea1623 100644 --- a/pkg/transformers/join.go +++ b/pkg/transformers/join.go @@ -92,6 +92,8 @@ func transformerJoinUsage( fmt.Fprintf(o, " --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field\n") fmt.Fprintf(o, " names from the left file. Automatically includes the join-field name(s). Helpful\n") fmt.Fprintf(o, " for when you only want a limited subset of information from the left file.\n") + fmt.Fprintf(o, " Tip: you can use --lk \"\": this means the left file becomes solely a row-selector\n") + fmt.Fprintf(o, " for the input files.\n") fmt.Fprintf(o, " --lp {text} Additional prefix for non-join output field names from\n") fmt.Fprintf(o, " the left file\n") fmt.Fprintf(o, " --rp {text} Additional prefix for non-join output field names from\n") diff --git a/test/cases/cli-help/0001/expout b/test/cases/cli-help/0001/expout index 6dfaf2b80..b25e4a56d 100644 --- a/test/cases/cli-help/0001/expout +++ b/test/cases/cli-help/0001/expout @@ -467,6 +467,8 @@ Options: --lk|--left-keep-field-names {a,b,c} If supplied, this means keep only the specified field names from the left file. Automatically includes the join-field name(s). Helpful for when you only want a limited subset of information from the left file. + Tip: you can use --lk "": this means the left file becomes solely a row-selector + for the input files. --lp {text} Additional prefix for non-join output field names from the left file --rp {text} Additional prefix for non-join output field names from