console : do not try to set the color instead of removing the bold font

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5562 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-09-30 21:42:22 +00:00
parent 7e8af73853
commit abdbd245a2

View File

@@ -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 ();