You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@joerecra What are you trying to do with this: new \cli\table\Ascii([80, 20, 20])?
I'm not sure I fully understand what the problem is, but I'm guessing you're misinterpreting what the column widths do.
[80, 20, 20] will set the widths of the first three columns to 80, 20 and 20 respectively. It will probably produce broken and arbitrary output if you have more columns than you provide the width for.
So, either let the system just handle it automatically (new \cli\table\Ascii()), or provide as many widths as you have columns.
Let me know if I just misunderstood your report...
Well @schlessera, Whit this: new \cli\table\Ascii([80, 20, 20]) I'm trying to set width columns in my table.
When I add one column "Empty" and remove setRenderer this automatically renderers, let's call it "good"
But I want to set width, putting my own widths Maybe 50 or 80 or 100 whatever, I don't Know. But this doesn't work.
In last image I used: $table->setRenderer(new \cli\table\Ascii([80, 5, 20, 20, 20]));
but nothing changes. Another thing, in examples dir I change widths and it doesn't work neither.
Activity
wojsmol commentedon Aug 21, 2018
Please post
wp --infofrom your testing environment.joerecra commentedon Aug 21, 2018
Hey @wojsmol thanks for your request this is my wp --info:
OS: Linux 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php7.2
PHP version: 7.2.9-1+ubuntu18.04.1+deb.sury.org+1
php.ini used: /etc/php/7.2/cli/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /home/joe
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.0.0
schlessera commentedon Aug 21, 2018
@joerecra What are you trying to do with this:
new \cli\table\Ascii([80, 20, 20])?I'm not sure I fully understand what the problem is, but I'm guessing you're misinterpreting what the column widths do.
[80, 20, 20]will set the widths of the first three columns to80,20and20respectively. It will probably produce broken and arbitrary output if you have more columns than you provide the width for.So, either let the system just handle it automatically (
new \cli\table\Ascii()), or provide as many widths as you have columns.Let me know if I just misunderstood your report...
joerecra commentedon Aug 21, 2018
Well @schlessera, Whit this: new \cli\table\Ascii([80, 20, 20]) I'm trying to set width columns in my table.
When I add one column "Empty" and remove setRenderer this automatically renderers, let's call it "good"
But I want to set width, putting my own widths Maybe 50 or 80 or 100 whatever, I don't Know. But this doesn't work.
In last image I used: $table->setRenderer(new \cli\table\Ascii([80, 5, 20, 20, 20]));
but nothing changes. Another thing, in examples dir I change widths and it doesn't work neither.
I'm confusing. Sorry
joerecra commentedon Aug 22, 2018
Thank you @schlessera bug was corrected !