wp-cli/wp-cli — pull request #878 by ziz (2013-11-20 21:28:57+00:00)
Title: Look for WP installation in simple subdir configs

Teach WP-CLI about simple subdirectory installations of WP.

If the current directory contains `index.php` and index.php contains
a simple require of wp-blog-header.php (as the default index.php
and simple modifications of it for WP-in-a-subdirectory both do),
look for the WordPress installation based on that information.

Coding style: WP core recently changed to require `{}` around single-statement conditional bodies.

Implementation: If there's a more idiomatic way to implement this in WP-CLI, I welcome advice or gross rewriting of my patch.