From f6e1bf741f45d1fa3a541fc52fd5d19e9855b9bd Mon Sep 17 00:00:00 2001 From: Jon Langseth Date: Mon, 13 May 2013 12:50:04 +0200 Subject: [PATCH] Added some useful help to the help() --- trk | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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); } -- 2.39.2