[Bps-public-commit] Prophet branch, master, updated. 0.73-30-ga599dcc

sartak at bestpractical.com sartak at bestpractical.com
Wed Jan 6 16:16:06 EST 2010


The branch, master has been updated
       via  a599dcc4321d83c4060ff50fa4a5d7f9d847791d (commit)
      from  1ff4e783eeaedf42efdea11e8a931621b41294c8 (commit)

Summary of changes:
 lib/Prophet/CLI/Dispatcher.pm |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit a599dcc4321d83c4060ff50fa4a5d7f9d847791d
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Jan 6 16:15:50 2010 -0500

    Add a _gencomp command for helping out shell completion files

diff --git a/lib/Prophet/CLI/Dispatcher.pm b/lib/Prophet/CLI/Dispatcher.pm
index ccc0e41..5d2b0bf 100644
--- a/lib/Prophet/CLI/Dispatcher.pm
+++ b/lib/Prophet/CLI/Dispatcher.pm
@@ -113,6 +113,11 @@ on qr/^(alias(?:es)?|config)?\s+(.*)/ => sub {
     die "Could not find '$class' command class";
 };
 
+on qr/^_gencomp\s*(.*)/ => sub {
+    my $self = shift;
+    print "$_\n" for $self->dispatcher->complete($1);
+};
+
 sub run_command {
     my $name = shift;
     return sub {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list