Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Didn't work in zsh on my Mac. Fixed the issues and added a couple of effects:

https://github.com/lasanthak/snowjob/blob/main/snowjob.sh



[Because linking to cool zsh features seems to be a hobby of mine…]

If you're using zsh for this you can access terminfo directly¹, instead of hardcoding escapes(for example, "echoti cup $snowflakes[$i] $i"²) or shelling out to tput. You can also use zselect to replace sleep. Extra points for "echoti smcup" to use the secondary screen when available, instead of wiping the screen.

¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...

² To be fair it would need a minor change to array structure, as cup is zero-indexed.

³ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: