diff options
| author | Teddy Wing | 2018-01-27 17:48:47 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-01-27 17:48:47 +0100 |
| commit | 1c5416f04dc6f4b6c98f6007ca3410b8ec30c8e3 (patch) | |
| tree | 633a3bc70b03e83ed9f45dd999a886be833a6f18 | |
| parent | c99f17eb0186b3daad5d43885c654520a95daa9a (diff) | |
| download | harvester-1c5416f04dc6f4b6c98f6007ca3410b8ec30c8e3.tar.bz2 | |
harvester: Print usage on `--help`
| -rwxr-xr-x | harvester | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,5 +1,19 @@ #!/bin/bash +function print_usage () { + cat 1>&2 <<__EOF__ +Usage: harvester [<flags>] + +Flags: + --help Show context-sensitive help. + -p, --project=PROJECT Project alias. + -t, --time=7 Time spent working on project. + -d, --date=DATE Date when work was done (e.g. 2017-01-31). + -m, --description=DESCRIPTION Description of work. + --list-modules List project sprints with IDs. +__EOF__ +} + function main () { local project='' local time='' @@ -64,6 +78,9 @@ function main () { continue ;; --help) + print_usage + + return 0 ;; esac done |
