←back to thread

2039 points Gadiguibou | 3 comments | | HN request time: 0.754s | source
Show context
renewiltord ◴[] No.36494351[source]
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!" ```

replies(2): >>36494572 #>>36507036 #
1. Svetlitski ◴[] No.36494572[source]
I can’t help but ask, why “,notify” and not just “notify”?
replies(1): >>36494636 #
2. renewiltord ◴[] No.36494636[source]
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.

replies(1): >>36494961 #
3. wpm ◴[] No.36494961[source]
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.