Closed kodumbeats closed 3 years ago
@kodumbeats thank you for raising this. I was just working on this today.
Do you have any suggestions to tackle this?
My first thoughts after perusing these scripts:
printf
with some padding in the front. Could first run the output string through wordwrap()
, and then fiddle with the padding right before writing to STDOUT.Manipulators.php
is the right place to check wrapping.I'll experiment with wordwrap()
and let you know.
I was thinking of moving this logic of calculating the padding etc to Parser.php
since Manipulators.php
is specific to the jc21
table library that we are using.
Parser.php
was intended to abstract all the logic for printing / formatting etc.
Aha, Parser.php
looks like a better place. :) Most of the necessary abstraction logic is already in parseResponse
it seems.
@kodumbeats
As an example,
appwrite help
produces a list of services. Zero of these lines are under 80 columns,["storage", "users"]
are the only under 100 (the current linux kernel standard), and the longest lineteams
is 149 columns.Just a style preference, but it's a pain point to resize my terminal every time I use the CLI.