use lib_by_script; use PSH; PSH::welcome; eval {require './.psh.profile' if -e '.psh.profile'}; print "Error in .psh.profile : $@\n" if ($@); $PSH::specials{'?'}=\&PSH::disp; PSH::prompt('psh'); sub PSH::disp { my $cmd = $_[0]; $cmd =~ s/^\s*(.*?)\s*$/$1/; if ($_[0] eq '') { PSH::help(); } else { print eval($cmd); print STDOUT "\nERROR: $@\n" if $@; } }