config-command icon indicating copy to clipboard operation
config-command copied to clipboard

Abstract `config set --add` to `config add`

Open danielbachhuber opened this issue 7 years ago • 4 comments

config set --add is a deviation from our standard syntax. Typically, set and add are two separate operations (e.g. option set vs. option add, and cache set vs. cache add).

It'd be better to abstract config set --add to config add.

We may also consider a config update, which would add the constant if it didn't exist, or update it if it did.

danielbachhuber avatar Feb 17 '18 14:02 danielbachhuber

@wp-cli/committers Does this seem reasonable to you?

danielbachhuber avatar Feb 17 '18 14:02 danielbachhuber

Seems reasonable to me.

gitlost avatar Feb 17 '18 18:02 gitlost

Agreed.

Using the same CRUD verbs as the option command seems the most straightforward to me.

wp config get
wp config add
wp config update
wp config delete

frankiejarrett avatar Feb 17 '18 18:02 frankiejarrett

Hehe, I think I started out with wp config add & wp config update, but then later changed it.

schlessera avatar Feb 20 '18 08:02 schlessera