X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCommand%2FClearCommand.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCommand%2FClearCommand.php;h=1a5b845d6e23e2e5ec6c4bca7403bdfba7c044be;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/psy/psysh/src/Command/ClearCommand.php b/vendor/psy/psysh/src/Command/ClearCommand.php new file mode 100644 index 000000000..1a5b845d6 --- /dev/null +++ b/vendor/psy/psysh/src/Command/ClearCommand.php @@ -0,0 +1,49 @@ +setName('clear') + ->setDefinition([]) + ->setDescription('Clear the Psy Shell screen.') + ->setHelp( + <<<'HELP' +Clear the Psy Shell screen. + +Pro Tip: If your PHP has readline support, you should be able to use ctrl+l too! +HELP + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->write(sprintf('%c[2J%c[0;0f', 27, 27)); + } +}