Skip to content

Conversation

@sun
Copy link
Contributor

@sun sun commented Aug 18, 2022

Problem

  • The SHELL_PIPE env variable does not work for the db command.

Proposed solution

  1. Clarify docs for how to retain ASCII table formatting with the db command.
  2. Clarify docs for how to use the env variable, because not all users understand how env variables are specified; the only correct example I found was in the original issue Retain ascii table formatting wp-cli#1102.

Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request, @sun !

As a heads up, our documentation is automatically generated from the codebase. These changes will need to be applied over here, too: https://github.com/wp-cli/wp-cli/blob/f3e4b0785aa3d3132ee73be30aedca8838a8fa06/php/utils.php#L1175-L1199

Although, do you think we should fix wp db query's behavior instead, and make sure the SHELL_PIPE variable is passed through?

@codepuncher
Copy link

I have found that SHELL_PIPE is also ignored when using a command such as wp @production db size --human-readable --all-tables

@schlessera schlessera merged commit 9a2b97a into wp-cli:main Jan 17, 2023
@schlessera
Copy link
Member

Thanks for the PR, @sun !
I'll move them over to the generated docs now.

@schlessera
Copy link
Member

@danielbachhuber :

Although, do you think we should fix wp db query's behavior instead, and make sure the SHELL_PIPE variable is passed through?

The mysql command does not understand that, and the provided work-around is not a full replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants