OSDN Git Service
Introduce system editor function in \WP_CLI\Utils
Adds a function called `launch_editor_for_input()` which launches the
system's editor to allow file editing of post content, etc. Should
account for system line-endings properly, but probably needs testing on
Windows to be sure. Function returns false if no change (ie user :q!'s
out of vim), or updated content if any change is made.
Also adds two new subcommands to `wp post`:
- `wp post create --edit` Launches the editor to build the post
content before creating post.
- `wp post edit <id>` Edits post <id>'s content in system editor.