wp-cli / wp-cli

⚙️ WP-CLI framework

Home Page:https://wp-cli.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to copy help output to clipboard

rapidsysc opened this issue · comments

Due to the way that help is displayed, it is impossible to digest it. Please provide an option so that the out can simply be sent to the console.

I found a way to do this: wp --help | more

I guess this can be closed but I would recommend adding this solution to the help output (at the top.) Also, please add this to this page: https://developer.wordpress.org/cli/commands/help/

@rapidsysc WP-CLI honors the unix PAGER environment variable, but will fall back to less on Linux and more on Windows if it is not set.

You can change the behavior by setting this variable, for example by putting something like export PAGER=more into your bash.rc file or other startup script file.

You can also directly use any of these by prepending the variable, like so: PAGER=more wp cli --help.

If you want to just have the entire help text be dumped to the console without any extra logic, use cat as the pager: PAGER=cat wp cli --help.

Cool - thanks for that extra information!