[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 7b169abe5811031f4ec6fe919abc31204e9e9d87
jesse
jesse at bestpractical.com
Sun Jan 25 17:40:26 EST 2009
The branch, master has been updated
via 7b169abe5811031f4ec6fe919abc31204e9e9d87 (commit)
from 5eae4b4023ff8b74369c7967b3789e5db3d86516 (commit)
Summary of changes:
lib/App/SD/CLI/Command/Shell.pm | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 7b169abe5811031f4ec6fe919abc31204e9e9d87
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Jan 25 17:40:08 2009 -0500
Get the project name into the shell
diff --git a/lib/App/SD/CLI/Command/Shell.pm b/lib/App/SD/CLI/Command/Shell.pm
index 961800d..f0b164e 100644
--- a/lib/App/SD/CLI/Command/Shell.pm
+++ b/lib/App/SD/CLI/Command/Shell.pm
@@ -2,12 +2,25 @@ package App::SD::CLI::Command::Shell;
use Moose;
extends 'Prophet::CLI::Command::Shell';
+has project_name => (
+ isa => 'Str',
+ is => 'rw',
+ default => sub { shift->app_handle->setting( label => 'project_name' )->get()->[0]; }
+ );
+
sub preamble {
my $self = shift;
return join "\n",
- "SD for ".$self->app_handle->setting( label => 'project_name' )->get()->[0]." ($App::SD::VERSION; Prophet $Prophet::VERSION)",
+ "SD for ".$self->project_name." ($App::SD::VERSION; Prophet $Prophet::VERSION)",
'Type "help", "about", or "copying" for more information.',
}
+sub prompt {
+ my $self = shift;
+
+ return $self->project_name.">";
+}
+
+
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list