wp-cli / handbook

📖 Complete documentation for WP-CLI

Home Page:https://make.wordpress.org/cli/handbook/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add documentation for the `--foo[=<bar>]` syntax

schlessera opened this issue · comments

If you want to provide a flag that can optionally include a value, the syntax is --foo[=<bar>].

If you want to make that flag with an optional value entirely optional as well, the syntax is [--foo[=<bar>]].

This needs to be documented in the command cookbook.

I thought it's [--foo[=<bar>]] 🙂

See https://wordpress.slack.com/archives/C02RP4T41/p1525867354000141

Edit: never mind...need more coffee.

@swissspidy Adapted the description to include both.

Created pull request: #293