[Bps-public-commit] r14745 - Prophet/trunk/lib/Prophet

jesse at bestpractical.com jesse at bestpractical.com
Mon Aug 4 00:33:21 EDT 2008


Author: jesse
Date: Mon Aug  4 00:33:19 2008
New Revision: 14745

Modified:
   Prophet/trunk/lib/Prophet/CLI.pm

Log:
Allow sd ticket show <some uuid> to work  like <some id>

Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI.pm	Mon Aug  4 00:33:19 2008
@@ -218,11 +218,11 @@
     my $self = shift;
 
     my @primary;
-    push @primary, shift @ARGV while ( $ARGV[0] && $ARGV[0] =~ /^\w+$/ && $ARGV[0] !~ /^--/ );
+    push @primary, shift @ARGV while ( $ARGV[0] && $ARGV[0] !~ /^--/ );
 
     # "ticket show 4" should DWIM and "ticket show --id=4"
     $self->set_arg(id => pop @primary)
-        if @primary && $primary[-1] =~ /^\d+$/;
+        if @primary && $primary[-1] =~ /^(?:\d+|[0-9a-f]{8}\-)/i;
 
     my $sep = 0;
     my @sep_method = (



More information about the Bps-public-commit mailing list