github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/tabulate/tabulate_doc.yaml (about)

     1  - DocumentID: tabulate
     2    Title: >+
     3      `tabulate`
     4    CategoryID: commands
     5    Summary: >-
     6      Table transformation tools
     7    Description: |-
     8      `tabluate` is a swiss army knife for table transforming human readable tables
     9      into machine readable data structure.
    10  
    11      > Please note that this builtin is still in active development and the default
    12      > behavior will continue to change and evolve. Any features marked with a flag
    13      > (see below) will be stable, have numerous tests written against them, and
    14      > thus safe to use.
    15    Usage: |-
    16      ```
    17      <stdin> -> tabulate [ flags ] -> <stdout>
    18      ```
    19    Examples:
    20    Flags:
    21      --column-wraps: >-
    22        Boolean, used with --map or --key-value to merge trailing lines if the text
    23        wraps within the same column
    24      --help: >-
    25        Boolean, displays a list of flags
    26      --joiner: >-
    27        String, used with --map to concatenate any trailing records in a given field
    28      --key-inc-hint: >-
    29        Boolean, used with --map to split any space or equal delimited hints/examples
    30        (eg parsing flags)
    31      --key-value: >-
    32        Boolean, discard any records that don't appear key value pairs (auto-enabled
    33        when --map used)
    34      --map: >-
    35        Boolean, return JSON map instead of table
    36      --separator: >-
    37        'String, custom regex pattern for spliting fields (default: `(\t|\s[\s]+)+`)'
    38      --split-comma: >-
    39        Boolean, split first field and duplicate the line if comma found in first
    40        field (eg parsing flags in help pages)
    41      --split-space: >-
    42        Boolean, split first field and duplicate the line if white space found in
    43        first field (eg parsing flags in help pages)
    44    Detail: |-
    45      ### Dynamic Autocompletion
    46  
    47      Because `tabulate` is designed to parse human readable tables, it is used a lot
    48      for dynamically turning command like program help output into JSON maps for
    49      `autocomplete`'s **DynamicDesc** blocks:
    50  
    51      ```
    52      rsync --help -> @[^Options$..--help]re -> tabulate --map --split-comma --column-wraps --key-inc-hint
    53      ```
    54    Synonyms:
    55    Related:
    56      - formap
    57      - item-index
    58      - element
    59      - format
    60      - autocomplete