Page MenuHomePhabricator

Support autocompletion for MediaWiki's run.php
Open, Needs TriagePublic

Description

Remembering the exact path/classname of maintenance scripts is one of the more cumbersome aspects of running a maintenance script. Decent CLI frameworks offer command autocompletion, it would be nice if run.php did that.

Event Timeline

The basic idea would be to have a flag like run.php --autocomplete Flow: which returns a list of completions by getting a list of extension-name-prefixed files from $IP/{extensions,skins}/maintenance/* and maybe a list of class names matching MediaWiki\Extension\*\Maintenance\* from $wgAutoloadLocalClasses and Composer\Autoload\ClassLoader::getLoader()->getClassMap() although that's more fragile and probably slow.