diff --git a/features/aliases.feature b/features/aliases.feature index af9aa1c857..2255d4756b 100644 --- a/features/aliases.feature +++ b/features/aliases.feature @@ -112,6 +112,14 @@ Feature: Create shortcuts to specific WordPress installs path: testdir """ + When I run `wp cli aliases` + Then STDOUT should be YAML containing: + """ + @all: Run command against every registered alias. + @testdir: + path: testdir + """ + When I run `wp cli alias --format=json` Then STDOUT should be JSON containing: """ diff --git a/php/commands/cli.php b/php/commands/cli.php index 03996e8869..73c3f53f50 100644 --- a/php/commands/cli.php +++ b/php/commands/cli.php @@ -519,6 +519,8 @@ public function completions( $_, $assoc_args ) { * @both: * - @prod * - @dev + * + * @alias aliases */ public function alias( $_, $assoc_args ) { WP_CLI::print_value( WP_CLI::get_runner()->aliases, $assoc_args );