Skip to content

Commit

Permalink
Merge 9f197c4 into 524f4e9
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmic committed Jul 19, 2019
2 parents 524f4e9 + 9f197c4 commit 5e0e28f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/web-tinker.php
Expand Up @@ -24,4 +24,9 @@
* application directory.
*/
'config_file' => env('PSYSH_CONFIG', null),

/*
* Show execution timestamp
*/
'show_timestamp' => false,
];
9 changes: 9 additions & 0 deletions src/Tinker.php
Expand Up @@ -109,6 +109,15 @@ protected function cleanOutput(string $output): string
{
$output = preg_replace('/(?s)(<aside.*?<\/aside>)|Exit: Ctrl\+D/ms', '$2', $output);

if (config('web-tinker.show_timestamp')) {
$output = $this->getTimestamp().$output;
}

return trim($output);
}

protected function getTimestamp()
{
return '<span class="text-dimmed">'.now().'</span><br>';
}
}

0 comments on commit 5e0e28f

Please sign in to comment.