I'm working on a Vim plugin for WordPress that integrates with WP-CLI. Certain wp-cli commands like wp plugin list return Ascii table formatted output. When I run these commands through Vim, with the system() call, the Ascii formatting gets lost. This happens even when I explicitly specify the --format=table option.
In other tests I noticed that the formatting also gets lost when piping to less or redirecting to a file. It seems there are conditionals that alter output based on the type of output stream wp-cli is writing to.
Is there a way to preserve the table formatting?
Thanks.
I'm working on a Vim plugin for WordPress that integrates with WP-CLI. Certain
wp-clicommands likewp plugin listreturn Ascii table formatted output. When I run these commands through Vim, with thesystem()call, the Ascii formatting gets lost. This happens even when I explicitly specify the--format=tableoption.In other tests I noticed that the formatting also gets lost when piping to
lessor redirecting to a file. It seems there are conditionals that alter output based on the type of output stream wp-cli is writing to.Is there a way to preserve the table formatting?
Thanks.