]> git.defcon.no Git - trk/commitdiff
Added some useful help to the help()
authorJon Langseth <jonl@p06076.(none)>
Mon, 13 May 2013 10:50:04 +0000 (12:50 +0200)
committerJon Langseth <jonl@p06076.(none)>
Mon, 13 May 2013 10:50:04 +0000 (12:50 +0200)
trk

diff --git a/trk b/trk
index bd10e9ec45c9f2724e2d1ba855130282b16f739c..83bf87d41760e33283239de0817164f0835a7358 100755 (executable)
--- a/trk
+++ b/trk
@@ -44,13 +44,17 @@ use constant {
 sub help
 {
        my $code = shift;
-       printf("It seems you require assistance\n");
 
-       if ( $code )
-       {
-               printf("How to start\n") if $code == START;
-               printf("How to time\n")  if $code == TIMEFORMAT;
-       }
+       printf("Error in invocation. Syntax summary:\n\n");
+       printf("  %s {start|on} [at yyyy-mm-dd hh:mm] <trackname>\n", $0);
+       printf("  %s {stop|off} [at yyyy-mm-dd hh:mm] \n", $0);
+       printf("  %s {activity|task} [at yyyy-mm-dd hh:mm] <taskname>\n", $0);
+       printf("  %s main [at yyyy-mm-dd hh:mm]\n", $0);
+       printf("  %s {projects|list} [verbose]\n", $0);
+       printf("  %s report [{terse|standard|verbose|details}] [<trackname>]\n", $0);
+       printf("  %s edit <trackname>\n", $0);
+       printf("\nSee README.txt for more information\n");
+
        exit(-1);
 }