diff options
author | Guillermo Ramos | 2022-01-20 11:54:48 +0100 |
---|---|---|
committer | Guillermo Ramos | 2022-01-20 11:54:48 +0100 |
commit | e6ff299df50fe5db6037a0800144a22e4157b2c6 (patch) | |
tree | 434dab1058b20d0bc82f2b880b9a98d610b478e9 /gromo | |
parent | acf0af089501a0d1d167df73426f28d57081df96 (diff) | |
download | cli-e6ff299df50fe5db6037a0800144a22e4157b2c6.tar.gz |
shellcheck
Diffstat (limited to 'gromo')
-rwxr-xr-x | gromo | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -109,11 +109,11 @@ EOF out+="\n" done - sortedout=$(printf "$out" | sort -t $FS -k 2 -rn) + sortedout=$(printf '%s' "$out" | sort -t $FS -k 2 -rn) if [ -n "$sortedout" ]; then while IFS=$FS read -r task dur gromos; do - echo -e "$task\n\t$gromos gromos, $(pp_seconds $dur)" - done <<<$sortedout + echo -e "$task\n\t$gromos gromos, $(pp_seconds "$dur")" + done <<<"$sortedout" fi fi fi @@ -123,7 +123,7 @@ parse_duration() { duration=$1 case ${duration:0,-1} in s) - echo ${duration%s} + echo "${duration%s}" ;; m) echo $((${duration%m} * 60)) @@ -205,7 +205,7 @@ while getopts "$optspec" optchar; do ;; esac done -shift $(($OPTIND - 1)) +shift $((OPTIND - 1)) if [ "$#" -eq 1 ]; then fulltask="$1" @@ -229,7 +229,7 @@ while true; do echo -ne "\r\033[K[** IN PROGRESS: $fulltask **] " echo "$fulltask" > "$STATE_FILE" - sleep $gromo_duration + sleep "$gromo_duration" echo idle > "$STATE_FILE" inc_subtask "$fulltask" @@ -239,6 +239,6 @@ while true; do exit 0 fi - (sleep $stop_duration && mpv --no-terminal "$DING_FILE") & + (sleep "$stop_duration" && mpv --no-terminal "$DING_FILE") & slock || exit done |