Add mac support for cooldowns.sh#1
Conversation
mprpic
left a comment
There was a problem hiding this comment.
Looks great, thank you for the PR! Just one minor comment to address.
|
Optional if you feel like it: your test plan could be converted into a CI workflow that runs those same instructions to validate some of script's functionality. |
|
Great idea, addressed comments and added the GH workflows! You can see the tests passing here - https://github.com/pdufour/cooldowns/actions/runs/25094497004/job/73527930256. |
|
This doesn't work on macOS Sequoia 15.7.5: date_to_epoch() { date -j -f '%Y-%m-%d' "$1" +%s 2>/dev/null; }Example: And the error is masked because of the use of |
Ha, that's because pip 26.1 now has the relative duration days feature: https://pip.pypa.io/en/stable/news/#v26-1 Prior versions only allowed direct timestamps (like |
Oh, of course – Thanks for catching that! |
Background
Some of the commands are not mac osx compatible + it doesn't look in places like
~/.zshrcSpecific Changes
grep -oPwith cross-compatible version~/.zshrcTest Plan
Test on Linux (regression test):
Test on Mac