by lelanthran · 3y ago · 0 comments
ASCII was perfect for table output. All tools had to do when outputting is use the standard existing characters when no TTY is detected, else use tabs/spaces and newlines.
I always wondered why no one uses the ASCII rs and FS codes.
FS=, RS=; GS=( US=)
Is that what you mean?It deals with 99.99% of uses cases that pipes are being used for right now.
That's more than good enough.
If you really needed to output a tree using only rs and fs characters, and since they are only a single byte each, you could cover that 1 in a 1000 use case by using empty fields for depth of a record, and attaching any record to the current parent until the depth changes.
Depth of a record seems useful, but then you'll have to make fields mandatory to indicate between real records and depth. slowing down the parsing.