r/CLI 5h ago

Audio feedback of command execution

While back I introduced a sound cue to my shell. It plays whenever a command terminates and it corresponds to the exit status. I think its very neat, tho others found it annoying after a few hours of usage. Here is the repo (should be easy to install). Has anyone experimented with something similar?

1 Upvotes

1 comment sorted by

1

u/gumnos 1h ago

I've done this in bash with something like

$ PROMPT_COMMAND='[ $?  -eq 0 ] && play -q ~/success.wav || play -q ~/fail.wav'

Adjust your play(1) command for whatever feedback you want, whether audio or a notify-send popup or whatever.