Commit 30c94601665181e3970ba0670853d8ad24866565

Authored by Georg Hopp
1 parent 7b10c057

Fix expansion problems

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