top | item 41558346

(no title)

gknoy | 1 year ago

I have a shell alias that I use sometimes when running long-running test suites locally, or doing some long task that is blocking my work (building Docker images, installing libraries). It echoes something for the shell, shows a success/failure image in the terminal, and playes an audio clip (loud and annoying ;)) when tests pass. The only way I could make it better would be to play a sad trombone on failure:

    # e.g. pytest tests/test_foo.py && SUCCESS
    alias SUCCESS="echo -e '\n\nSUCCESS' \
               && bash -c 'mpv ${media}/kazoo.mp3 &' \
               && imgcat ~/Pictures/success.png \
               || imgcat ~/Pictures/fail.png"
It's useful because I can hear that the task is done while I'm reviewing a PR, or reading documentation, or loading the dishwasher.

discuss

order

No comments yet.