malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

Fix SLEEP countdown #57

Closed ghost closed 4 years ago

ghost commented 4 years ago

In sleep, countdown works correctly up to 1 minute and then shows "raw" seconds: Incorrect countdown If there are more than 99 seconds to wait, the countdown does not display.


This change adds a correct countdown which works up to 99 hours: Correct countdown

I also added h suffix for hours.

malxau commented 4 years ago

For what it's worth, I pushed commit 1f377e40d8d673a0a02d5b3bb16b38cd40527cbd which happens when printf is asked to operate on a 64 bit integer with a specified field size and the integer is too large (ie., would hang in this code if asked to sleep for more than 100 hours.)