From: Jon Langseth Date: Mon, 13 May 2013 10:50:04 +0000 (+0200) Subject: Added some useful help to the help() X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;h=f6e1bf741f45d1fa3a541fc52fd5d19e9855b9bd;p=trk Added some useful help to the help() --- diff --git a/trk b/trk index bd10e9e..83bf87d 100755 --- 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] \n", $0); + printf(" %s {stop|off} [at yyyy-mm-dd hh:mm] \n", $0); + printf(" %s {activity|task} [at yyyy-mm-dd hh:mm] \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}] []\n", $0); + printf(" %s edit \n", $0); + printf("\nSee README.txt for more information\n"); + exit(-1); }