Showing
1 changed file
with
3 additions
and
4 deletions
@@ -21,7 +21,7 @@ function datetimedescription() { | @@ -21,7 +21,7 @@ function datetimedescription() { | ||
21 | do | 21 | do |
22 | extracttime $T | 22 | extracttime $T |
23 | printf "%s;%s;%s;%s;%s\n" \ | 23 | printf "%s;%s;%s;%s;%s\n" \ |
24 | - $TIMEKEY $TIME $PROJECT $DESCRIPTION $COMPLETED | 24 | + "$TIMEKEY" "$TIME" "$PROJECT" "$DESCRIPTION" "$COMPLETED" |
25 | done | 25 | done |
26 | done | 26 | done |
27 | } | 27 | } |
@@ -32,7 +32,7 @@ function report() { | @@ -32,7 +32,7 @@ function report() { | ||
32 | DATE=$1 | 32 | DATE=$1 |
33 | for LINE in "${(f)$(datetimedescription $@|sort -t\; -f -k1,1 -k3,3)}" | 33 | for LINE in "${(f)$(datetimedescription $@|sort -t\; -f -k1,1 -k3,3)}" |
34 | do | 34 | do |
35 | - set -- ${(s(;))LINE} | 35 | + set -- "${(@s(;))LINE}" |
36 | if [[ -n $1 && $(date -d $1 +%s) -ge $(date -d $DATE +%s) ]] | 36 | if [[ -n $1 && $(date -d $1 +%s) -ge $(date -d $DATE +%s) ]] |
37 | then | 37 | then |
38 | if [[ $D != $1 ]] | 38 | if [[ $D != $1 ]] |
@@ -42,7 +42,7 @@ function report() { | @@ -42,7 +42,7 @@ function report() { | ||
42 | fi | 42 | fi |
43 | T=$2 | 43 | T=$2 |
44 | if [[ -n $5 ]] && T=$(bold "" $T) | 44 | if [[ -n $5 ]] && T=$(bold "" $T) |
45 | - if [[ -n $D ]] && printf "%s [%s] - %s\n" $T $3 $4 | 45 | + if [[ -n $D ]] && printf "%s [%s] - %s\n" "$T" "$3" "$4" |
46 | fi | 46 | fi |
47 | done | 47 | done |
48 | } | 48 | } |
@@ -104,6 +104,5 @@ done | @@ -104,6 +104,5 @@ done | ||
104 | 104 | ||
105 | DATEFROM=${DATEFROM:-$(date +%Y-%m-01)} | 105 | DATEFROM=${DATEFROM:-$(date +%Y-%m-01)} |
106 | report $DATEFROM $@ | 106 | report $DATEFROM $@ |
107 | -#datetimedescription $DATEFROM $@|sort -t\; -f -k1,1 -k3,3 | ||
108 | 107 | ||
109 | # vim: set et ts=4 sw=4: | 108 | # vim: set et ts=4 sw=4: |
Please
register
or
login
to post a comment