#!/usr/bin/env php
<?php
// If we're inside someone else's project - use that autoload
if (file_exists(__DIR__ . '/../../../autoload.php')) {
	require_once __DIR__ . '/../../../autoload.php';
} else {
	require_once __DIR__ . '/../vendor/autoload.php';
}

use MrRio\ShellWrap as sh;
use MrRio\ShellInspector;

$sh = new MrRio\ShellWrap;

error_reporting(0);
define('SHELL_WRAP_INTERACTIVE', true);

echo "ShellWrap Interactive Shell\n";
echo "\n";
echo 'Mapped to $sh due to eval() limitations. Ctrl+D to exit.' . "\n\n";

$boris = new \Boris\Boris('shellwrap> ');

$boris->setInspector(new ShellInspector());

$boris->setLocal(array('sh' => $sh));

try {
	$boris->start();
} catch (ShellWrapException $e) {
}