small changes to termux shortcuts
This commit is contained in:
parent
9e8baced38
commit
e5cf3a102d
|
@ -1,5 +1,3 @@
|
||||||
set -x
|
|
||||||
|
|
||||||
register_habits=$(ls ~/pdbs/ |
|
register_habits=$(ls ~/pdbs/ |
|
||||||
grep '\.habit$' |
|
grep '\.habit$' |
|
||||||
fzy)
|
fzy)
|
||||||
|
|
|
@ -9,23 +9,23 @@ today=$(date "+%m/%d/%Y")
|
||||||
|
|
||||||
# $1 -- habit filename
|
# $1 -- habit filename
|
||||||
show_past_habit () {
|
show_past_habit () {
|
||||||
printf "%55s =========\n" "$1"
|
printf "%25s =========\n" "$1"
|
||||||
donein5days=$(grep -c "$day5" ~/pdbs/$1.habit )
|
donein5days=$(grep -c "$day5" "$HOME/pdbs/$1")
|
||||||
donein4days=$(grep -c "$day4" ~/pdbs/$1.habit )
|
donein4days=$(grep -c "$day4" "$HOME/pdbs/$1")
|
||||||
donein3days=$(grep -c "$day3" ~/pdbs/$1.habit )
|
donein3days=$(grep -c "$day3" "$HOME/pdbs/$1")
|
||||||
donein2days=$(grep -c "$day2" ~/pdbs/$1.habit )
|
donein2days=$(grep -c "$day2" "$HOME/pdbs/$1")
|
||||||
donein1days=$(grep -c "$day1" ~/pdbs/$1.habit )
|
donein1days=$(grep -c "$day1" "$HOME/pdbs/$1")
|
||||||
donetoday=$(grep -c "$today" ~/pdbs/$1.habit)
|
donetoday=$(grep -c "$today" "$HOME/pdbs/$1")
|
||||||
|
|
||||||
printf "%10s %10s %10s %10s %10s %10s\n%10s %10s %10s %10s %10s (today)%3s\n\n" \
|
printf "%.5s %.5s %.5s %.5s %.5s %.5s\n%5s %5s %5s %5s %5s %5s\n\n" \
|
||||||
"$day5" "$day4" "$day3" "$day2" "$day1" "$today" \
|
"$day5" "$day4" "$day3" "$day2" "$day1" "$today" \
|
||||||
"$donein5days" "$donein4days" "$donein3days" \
|
"$donein5days" "$donein4days" "$donein3days" \
|
||||||
"$donein2days" "$donein1days" "$donetoday"
|
"$donein2days" "$donein1days" "$donetoday"
|
||||||
}
|
}
|
||||||
|
|
||||||
habits=$(ls ~/pdbs | grep '\.habit$' | sed 's/\.habit$//g')
|
habits=$(ls ~/pdbs | grep '\.habit$')
|
||||||
IFS='
|
for i in $habits; do
|
||||||
'
|
|
||||||
for i in "$habits"; do
|
|
||||||
show_past_habit "$i"
|
show_past_habit "$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
read
|
||||||
|
|
Loading…
Reference in New Issue