OSDN Git Service

allow (but ignore) a leading "[no-]" before flag name in @synopsis
authorsmhmic <smhmic@gmail.com>
Tue, 10 Sep 2013 19:29:23 +0000 (15:29 -0400)
committersmhmic <smhmic@gmail.com>
Tue, 10 Sep 2013 19:29:23 +0000 (15:29 -0400)
commita9adf7b78bcefe3b5db03e167f53c6263dab1549
tree5aa422af2c89d0c73eaa050010aaac65d9870c08
parent3aded1e2db0519e43cf62d8a3a121d7ffc28d6e1
allow (but ignore) a leading "[no-]" before flag name in @synopsis

`no-` prefix on flag name sets it to `false`, but there was no valid way to show this in usage synopsis. Showing this is relevant for flags with a dynamic default value (like `--color` config flag).  This change makes `@synopsis [--[no-]flag]` valid.
php/WP_CLI/SynopsisParser.php