taskwarrior: Add tim alias for timewarrior

`tim` is intended as a quick support alias for timewarrior.

If invoked without any arguments, `tim` will print out a simple summary
of all tasks accomplished (for the day by default). It will also print
their ids for simple subsequent modification tasks.

If, however, invoked with additional arguments, `tim` will pass anything
along to timewarrior so anything happens as usual if invoked like this.

Thus, `tim` functions as a quick look into the day's timesheet or a
shorter alternative to the `timew` command.
This commit is contained in:
Marty Oehme 2021-11-23 15:59:45 +01:00
parent df0cf3d540
commit 7a7ce3a296
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -0,0 +1,16 @@
#!/usr/bin/env sh
if ! exist timew; then
return 1
fi
# invoking tim without arguments prints out timesheet summary
# with ids attached.
# otherwise tim passes through any arguments to timew
tim() {
if [ "$#" -eq 0 ]; then
timew summary :ids
else
timew "$@"
fi
}