package Psh
::Builtins
::History
;
Prints out [the last n] entries in the history
=item * C<history> text [n]
Searches [the last n] entries in the command history and
prints them if they contain "text".
return (0,undef) unless $num;
while (my $arg=shift @args) {
for ($i=@Psh::history
-$num; $i<$max; $i++) {
next if $grep and $Psh::history
[$i]!~/\Q$grep\E/;
Psh
::Util
::print_out
(' '.sprintf('%3d',$i+1).' '.$Psh::history
[$i]."\n");