dev-master
9999999-devPsySH using Hoa\Console readline library.
MPL-2.0
The Requires
by USAMI Kenta
Wallogit.com
2017 © Pedro Peláez
PsySH using Hoa\Console readline library.
PsySH with pure PHP readline support from Hoa\Console., (*1)
This project will be abandoned in the future (after psy/psysh next major release)., (*2)
You can use this package in psy/psysh:0.7.2 or earlier., (*3)
This code is integrated into PsySH. (Pull Request #300 · bobthecow/psysh is merged.), (*4)
Get Composer., (*5)
composer require global require zonuexe/psysh-hoa-console, (*6)
cd /path/to/your/project; composer require zonuexe/psysh-hoa-console, (*7)
Put snippet into your private REPL code., (*8)
use Psy\Readline\GNUReadline;
use Psy\Readline\Libedit;
use zonuexe\Psy\Readline\HoaConsoleAdapter;
$is_dumb = !isset($_ENV['TERM']) || ($_ENV['TERM'] === 'dumb');
$config = new \Psy\Configuration;
if (!$is_dump && !GNUReadline::isSupported() && !Libedit::isSupported()) {
$config->setReadline(new HoaConsoleAdapter);
}
$sh = new \Psy\Shell($config);
$sh->run();
See PHPを「シェル化」する [psy/psysh] - 超PHPerになろう (in Japanese), (*9)
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/., (*10)
PsySH Hoa\Consle - Interactive shell using pure PHP readline copyright 2016 USAMI Kenta, (*11)
PsySH using Hoa\Console readline library.
MPL-2.0