Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alignment functionality to tables #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rolf-yoast
Copy link

Fixes #239

@rolf-yoast rolf-yoast requested a review from a team as a code owner April 19, 2024 06:20
@rolf-yoast rolf-yoast changed the title Add alignments to table Add alignment functionality to tables Apr 19, 2024
@@ -1166,7 +1166,8 @@ function ( $a, $b ) use ( $order, $orderby ) {

// Display the rows.
$args = [
'format' => $format,
'format' => $format,
'alignments' => [ 'Size' => Column::ALIGN_RIGHT ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we apply this only when ! WP_CLI\Utils\isPiped()? If someone is piping table output to a script right now, this could break their parsing.

Also, this is currently blocked by wp-cli/php-cli-tools#171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it possible to enhance table format with right-align numeric values easily?
2 participants