[Bps-public-commit] r15100 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Aug 12 20:24:16 EDT 2008


Author: sartak
Date: Tue Aug 12 20:24:16 2008
New Revision: 15100

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm

Log:
 r69437 at onn:  sartak | 2008-08-12 20:24:10 -0400
 Add a preamble to the shell, which includes Prophet's version and commands for
 more information


Modified: Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm	Tue Aug 12 20:24:16 2008
@@ -26,11 +26,19 @@
     return $self->name . '> ';
 }
 
+sub preamble {
+    return join "\n",
+        "Prophet $Prophet::VERSION",
+        'Type "help", "about", or "copying for more information.',
+}
+
 sub run {
     my $self = shift;
 
     local $| = 1;
 
+    print $self->preamble . "\n";
+
     $self->cli->interactive_shell(1);
     while (defined(local $_ = $self->readline($self->prompt))) {
         next if /^\s*$/;



More information about the Bps-public-commit mailing list