CLI_Command::completions │ public │ WP-CLI 1.0

Generates tab completion strings.

OPTIONS

--line=<line>
The current command line to be executed.
--point=<point>
The index to the current cursor position relative to the beginning of the command.

EXAMPLES

# Generate tab completion strings.
$ wp cli completions --line='wp eva' --point=100
eval
eval-file

Метод класса: CLI_Command{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$CLI_Command = new CLI_Command();
$CLI_Command->completions( $_, $assoc_args );
$_(обязательный)
.
$assoc_args(обязательный)
.

Код CLI_Command::completions() WP-CLI 2.13.0-alpha

public function completions( $_, $assoc_args ) {
	$line  = substr( $assoc_args['line'], 0, $assoc_args['point'] );
	$compl = new Completions( $line );
	$compl->render();
}