Hacker News new | past | comments | ask | show | jobs | submit login

I use:

``` #!/usr/bin/env bash

    set -u

    title=${2:-Shell}
    msg=$1

    osascript -e "display notification \"$1\" with title \"$title\""
```

As `~/bin/,notify` and put it at the end of long-running commands:

``` run_this_program && ,notify "Long program is done!" ```




I can’t help but ask, why “,notify” and not just “notify”?


I name all my personal programs prefixed by the comma. I learnt it from someone on lobste.rs. No Unix utilities use the prefix in their name and it is a valid filename.

So I can type , and I am sure it's my program and I'm not running something else and it'll autocomplete among my list of programs.


This is a very cool idea, I always hesitate to add a lot of aliases to my zshrc since I never want to step on any toes.


an upvote wasn't enough! this is cool, thanks for sharing.




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

Search: