Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to be notified when a job is done or something finishes in a terminal, and I read somewhere about adding a Bell to the command prompt, and then turning on urgentOnBell. But I can't figure out how to add the bell properly to my ZSH prompt. Everything just prints \a. [\a] doesn't work, %{\a%} doesn't work, \a doesn't work. What's the correct way to do it?

share|improve this question

2 Answers 2

Ok, figured it out. I added:

%{$(echo "\a")%} 

Maybe not the prettiest (there's gotta be a way simply to output an escape code correctly) but it works.

share|improve this answer

I had this problem a while ago and found a working solution although it does not quite make a beep.

sudo apt-get install espeak
espeak "job complete"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.