]> git.defcon.no Git - trk/commitdiff
Verbose list with trak ID's
authorJon Langseth <jon.langseth@hig.no>
Tue, 14 May 2013 11:26:00 +0000 (13:26 +0200)
committerJon Langseth <jon.langseth@hig.no>
Tue, 14 May 2013 11:26:00 +0000 (13:26 +0200)
trk

diff --git a/trk b/trk
index f1cee049c035c27a34bc9601e6731bd6f71a818e..d089a47fd08139b28beb35ca8d813c0a763e4f30 100755 (executable)
--- a/trk
+++ b/trk
@@ -519,7 +519,15 @@ elsif ( ( $command eq "projects" ) || ( $command eq "list" )  )
        #foreach my $id ( keys %$tracks )
        foreach my $id ( sort { $tracks->{$a} cmp $tracks->{$b} || $a cmp $b } keys %$tracks  )
        {
-               printf(" %s %s\n", ($id eq $current ? ">" : " " ),$tracks->{$id} );
+       
+               if (( $#ARGV >= 1) && ( $ARGV[1] eq "verbose" ))
+               {
+                       printf(" %s %s %s\n", ($id eq $current ? ">" : " " ), $id , $tracks->{$id});
+               }
+               else
+               {
+                       printf(" %s %s\n", ($id eq $current ? ">" : " " ),$tracks->{$id} );
+               }
        }
        print("\n");
 }