-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Often when I'm using the terminal and I can't remember the exact argument names for a command, I'll use the --prompt flag. However, if I want to re-run the same command then there's no way to do that without going through all the prompts again.
It would be great if WP-CLI output the full command (excluding empty values) immediately before running it when the --prompt flag is used, in the same way that bash does when using historical reference commands such as !!. That way there's an easy reference to copy and paste.
This should be safe to do as the flag can only be used in interactive mode, so the output for a scripted command wouldn't change.
Example:
$ wp post list --prompt
1/4 [--<field>:
2/4 [--field=<field>]: title
3/4 [--fields=<fields>]:
4/4 [--format=<format>]: csv
wp post list --field=title --format=csv
Hello world!
swissspidy