protected function autocomplete(string $partialCommand, int $index): array
    {
        // @TODO Add more functionality by parsing the current buffer with readline_info()
        // @TODO Filter file system elements (if possible at all)

        $suggestions = [];

        $availableCommands = $this->bootstrap->getObjectManager()
            ->get(CommandManager::class)
            ->getAvailableCommands();

        /** @var $command Command */
        foreach ($availableCommands as $command) {
            if ($command->isInternal() === false) {
                $suggestions[] = $command->getCommandIdentifier();
            }
        }

        return $suggestions;
    }
protected function autocomplete(string $partialCommand, int $index): array
    {
        // @TODO Add more functionality by parsing the current buffer with readline_info()
        // @TODO Filter file system elements (if possible at all)

        $suggestions = [];

        $availableCommands = $this->bootstrap->getObjectManager()
            ->get(CommandManager::class)
            ->getAvailableCommands();

        /** @var $command Command */
        foreach ($availableCommands as $command) {
            if ($command->isInternal() === false) {
                $suggestions[] = $command->getCommandIdentifier();
            }
        }

        return $suggestions;
    }
protected function autocomplete ( string $ partialCommand , int $ index ) : array { // @TODO Add more functionality by parsing the current buffer with readline_info() // @TODO Filter file system elements (if possible at all) $ suggestions = [ ] ; $ availableCommands = $ this -> bootstrap -> getObjectManager ( ) -> get ( CommandManager :: class ) -> getAvailableCommands ( ) ; /** @var $command Command */ foreach ( $ availableCommands as $ command ) { if ( $ command -> isInternal ( ) === false ) { $ suggestions [ ] = $ command -> getCommandIdentifier ( ) ; } } return $ suggestions ; }
Returns autocomplete suggestions on hitting the TAB key.

@param string $partialCommand The current (partial) command where the TAB key was hit
@param integer $index The cursor index at the current (partial) command
@return array
Returns autocomplete suggestions on hitting the TAB key .