Add arguments only if present

This commit is contained in:
gardouille 2019-10-16 15:18:24 +02:00
parent d9f761340f
commit 16cc5efc08
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 20 additions and 4 deletions

24
zshrc
View File

@ -346,22 +346,38 @@ function tasec() {
## }}}
## Display tasks of today {{{
function taday() {
timew summary :day :ids "${*}"
if [ "${#}" -eq 0 ]; then
timew summary :day :ids
else
timew summary :day :ids "${*}"
fi
}
## }}}
## Display tasks of this week {{{
function taweek() {
timew summary :week :ids "${*}"
if [ "${#}" -eq 0 ]; then
timew summary :week :ids
else
timew summary :week :ids "${*}"
fi
}
## }}}
## Display tasks of this month {{{
function tamonth() {
timew summary :month :ids "${*}"
if [ "${#}" -eq 0 ]; then
timew summary :month :ids
else
timew summary :month :ids "${*}"
fi
}
## }}}
## Display tasks of this year {{{
function tayear() {
timew summary :year :ids "${*}"
if [ "${#}" -eq 0 ]; then
timew summary :year :ids
else
timew summary :year :ids "${*}"
fi
}
## }}}