protected function completeForOptionShortcuts()
    {
        $word = $this->context->getCurrentWord();

        if (strpos($word, '-') === 0 && strlen($word) == 2) {
            $definition = $this->command ? $this->command->getNativeDefinition() : $this->application->getDefinition();

            if ($definition->hasShortcut(substr($word, 1))) {
                return array($word);
            }
        }

        return false;
    }
protected function completeForOptionShortcuts()
    {
        $word = $this->context->getCurrentWord();

        if (strpos($word, '-') === 0 && strlen($word) == 2) {
            $definition = $this->command ? $this->command->getNativeDefinition() : $this->application->getDefinition();

            if ($definition->hasShortcut(substr($word, 1))) {
                return array($word);
            }
        }

        return false;
    }
protected function completeForOptionShortcuts ( ) { $ word = $ this -> context -> getCurrentWord ( ) ; if ( strpos ( $ word , '-' ) === 0 && strlen ( $ word ) == 2 ) { $ definition = $ this -> command ? $ this -> command -> getNativeDefinition ( ) : $ this -> application -> getDefinition ( ) ; if ( $ definition -> hasShortcut ( substr ( $ word , 1 ) ) ) { return array ( $ word ) ; } } return false ; }
Attempt to complete the current word as an option shortcut.

If the shortcut exists it will be completed, but a list of possible shortcuts is never returned for completion.

@return array|false
Attempt to complete the current word as an option shortcut .