Skip to content

Commit 82a9d0a

Browse files
committed
Init for autocomplete
1 parent 0dcf601 commit 82a9d0a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/PHPCR/Shell/Console/Application/ShellApplication.php

+13
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,19 @@ public function dispatchProfileInitEvent(InputInterface $sessionInput, OutputInt
304304
$this->dispatcher->dispatch(PhpcrShellEvents::PROFILE_INIT, $event);
305305
}
306306

307+
/**
308+
* Autocomplete invokes this method to get the command name completiongs.
309+
* If autocomplete is invoked before a command has been run, then
310+
* we need to initialize the application (and register the commands).
311+
*
312+
* {@inheritDoc}
313+
*/
314+
public function all($namespace = null)
315+
{
316+
$this->init();
317+
return parent::all($namespace);
318+
}
319+
307320
public function getContainer()
308321
{
309322
return $this->container;

0 commit comments

Comments
 (0)