-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Bug Report
Describe the current, buggy behavior
Adding an alias but forgetting its leading @ symbol results in an invalid alias being added, and a success message being shown to the user.
Describe how other contributors can replicate this bug
- Run
wp cli alias add hello --set-path=/and observe a success message - Run
wp @hello helpand observe the alias does not exist - Run
wp cli alias listand observe the alias is not listed - Open your
~/wp-cli/config.ymlfile and observe that the alias was added without a leading@symbol
Describe what you expect as the correct outcome
I would like the wp cli alias commands to work both with and without the leading @ symbol, with one being added as necessary behind the scenes.
The --grouping flag appears to be the only place in WP-CLI where the leading @ symbol is optional. Both of the following work:
wp cli alias add @foo --grouping=bar,bazwp cli alias add @foo --grouping=@bar,@baz