id = "join" name = "join" description = "Join lines of two sorted files on a common field." executables = ["join"] [commands] format = 1 label = "Join two files" description = "Equality join of two sorted files on a field. Both inputs must already be sorted on the join field." quality = "ai-draft" base = "fig:join" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/join.ts" license = "MIT" [[commands.field]] id = "file1" label = "File 1" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["src"] [[commands.field]] id = "file2" label = "File 2" type = "path" position = 1 path = { kind = "file", role = "input", must_exist = true } sources = ["src"] [[commands.field]] id = "field_both" label = "Join field (both files)" description = "Join on this field of both files." type = "integer" option = ["-j"] sources = ["src"] [[commands.field]] id = "field1" label = "Join field of file 1" description = "Join on the field-th field of file 1." type = "integer" option = ["-1"] sources = ["src"] [[commands.field]] id = "field2" label = "Join field of file 2" description = "Join on the field-th field of file 2." type = "integer" option = ["-2"] sources = ["src"] [[commands.field]] id = "delimiter" label = "Field delimiter" description = "Character used as field delimiter for input and output." type = "string" option = ["-t"] sources = ["src"] [[commands.field]] id = "output_fields" label = "Output fields" description = "Comma-separated list such as 0,1.2,2.3." type = "string" option = ["-o"] sources = ["src"] [[commands.field]] id = "empty" label = "Empty field filler" description = "Replace empty output fields with this string." type = "string" option = ["-e"] sources = ["src"] [[commands.field]] id = "also_unpaired" label = "Also print unpairable lines of file" description = "File number (1 or 2) whose unpairable lines are printed too." type = "integer" option = ["-a"] sources = ["src"] [[commands.field]] id = "only_unpaired" label = "Only unpairable lines of file" description = "File number (1 or 2) whose unpairable lines are printed instead of the default output." type = "integer" option = ["-v"] sources = ["src"] [[commands.task]] id = "join" label = "Join on first field" fields = ["file1", "file2"] required = ["file1", "file2"] [[commands.task]] id = "join_field" label = "Join on a chosen field" fields = ["file1", "file2", "field_both", "delimiter"] required = ["file1", "file2", "field_both"] [[commands.group]] id = "basic" label = "Basic" fields = ["file1", "file2", "field_both", "delimiter", "output_fields"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["field1", "field2", "empty", "also_unpaired", "only_unpaired"]