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

Wordwrapping in the tabular output #5922

Open
baizmandesign opened this issue Mar 28, 2024 · 1 comment
Open

Wordwrapping in the tabular output #5922

baizmandesign opened this issue Mar 28, 2024 · 1 comment

Comments

@baizmandesign
Copy link
Contributor

Hi there,

This is either a feature request or a support request, depending on whether the functionality I'm seeking exists.

In my terminal, whose usual dimensions are the standard 80x24, when I list things like plugins, I get output like that below:

$ wp plugin list --fields=name,version,update_version,status

+-----------------------+--------------------------+----------------+----------+
| name                  | version                  | update_version | status   |
+-----------------------+--------------------------+----------------+----------+
| advanced-custom-field | 6.2.7                    |                | active   |
| s                     |                          |                |          |
| advanced-query-loop   | 2.1.1                    |                | active   |
| all-in-one-wp-migrati | 7.81                     |                | inactive |
| on                    |                          |                |          |
| all-in-one-wp-migrati | 4.34                     |                | inactive |
| on-multisite-extensio |                          |                |          |
| n                     |                          |                |          |
+-----------------------+--------------------------+----------------+----------+

As you can see, the plugin names wrap onto multiple lines. I sometimes wish to copy and paste the names, but the line wrapping interferes with this. I know I can 1) widen my terminal and re-run the command or 2) pipe the output to a file (which strips the columnar formatting), but I'm wondering if there is a way to either...

  • display the content like the mysql client does, wrapping over lines but never in columns when the width of the content exceeds the terminal width.
  • or explicitly set the width of a given column or columns (even if that truncates some content).

I think "mysql client behavior" might be useful for more than just me.

Thanks for sharing your thoughts.

Saul

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

No branches or pull requests

2 participants