logo

utils

~/.local/bin tools and git-hooks
commit: 9f30dcacf0c56b0a19615ad11e99d6450d919de3
parent: 727edd162c0895d877dceb0980efec6053109d1a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  8 Jan 2019 06:01:34 +0100

bin/timey-whyme.sh: Update usage() and arguments

Diffstat:

Mbin/timey-whyme.sh27++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/bin/timey-whyme.sh b/bin/timey-whyme.sh @@ -7,7 +7,19 @@ later="$(date --date=+7days +%Y-%m-%d)" form='column -s, -o  -t' usage() { - printf "Usage: [[all|both|cal|todo]\n" + echo $0' [t…|c…|h…] + c…: show calendar + t…: show todo + h…: this help' + + echo ' +Files used: + • '$xdd'/calendar.csv + • '$xdd'/todo.csv' + + echo ' +Environment used: + XDG_DATA_DIR (defaults to “~/.local/share”)' } die() { @@ -36,16 +48,17 @@ $(cut -d '#' -f -1 "$xdd/calendar.csv" | grep -v '^$')" | sort -n | $form } case "$1" in - all*|both*|"") - todo; calendar + c*) + calendar ;; - todo*) + t*) todo ;; - cal*) - calendar + h*) + usage ;; *) - usage + todo + calendar ;; esac