mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 03:31:31 +00:00
updated streamline-setup v2
This commit is contained in:
@@ -25,7 +25,7 @@ use Psy\Util\Str;
|
||||
*/
|
||||
class Libedit extends GNUReadline
|
||||
{
|
||||
private $hasWarnedOwnership = false;
|
||||
private bool $hasWarnedOwnership = false;
|
||||
|
||||
/**
|
||||
* Let's emulate GNU Readline by manually reading and parsing the history file!
|
||||
@@ -48,6 +48,10 @@ class Libedit extends GNUReadline
|
||||
*/
|
||||
public function listHistory(): array
|
||||
{
|
||||
if ($this->historyFile === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$history = \file_get_contents($this->historyFile);
|
||||
if (!$history) {
|
||||
return [];
|
||||
@@ -63,6 +67,7 @@ class Libedit extends GNUReadline
|
||||
|
||||
// decode the line
|
||||
$history = \array_map([$this, 'parseHistoryLine'], $history);
|
||||
|
||||
// filter empty lines & comments
|
||||
return \array_values(\array_filter($history));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user