diff --git a/console.php b/console.php index f612ee9..6d4d030 100644 --- a/console.php +++ b/console.php @@ -708,12 +708,14 @@ class console // }}} /** Call a specific function when a completion key is pressed + * The function must get the partial text as first parameter, and must return + * an array with the possibilities + * If only one possibility is returned, the console will be immediately + * updated. * @param string|bool $completionKeys The list of the completion keys. False * unset the method * @param callable $completionFunction The function called when one of the * completion keys is pressed. - * The function must get the partial text as first parameter, and must return - * an array with the possibilities */ public function completeFunction ($completionKeys, $completionFunction) // {{{ @@ -920,10 +922,10 @@ class console // {{{ { if ($bold === false) - $bold = 2; + $bold = 0; else - $bold = ""; - echo "\033[${bold}1m"; + $bold = 1; + echo "\033[${bold}m"; } // }}} @@ -933,7 +935,7 @@ class console * @param string $line The line to tokenize * @return array The tokens */ - public function tokenize ($line) + static public function tokenize ($line) // {{{ { $tokens = array ();