Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't that beep every time you run a command? And/or interfere with any programs that use the beep for their own purposes?


> Wouldn't that beep every time you run a command?

It's up to the terminal emulator to do what it wants with the beep character. Technically, it's up to whoever has to display the character; if you're running bash at a tty — an actual terminal — then the kernel gets to decide what to do, so it beeps, since there is little else it could choose to do.

Terminal emulators, on the other hand, know they aren't actually in a limited environment and can do a lot more than playing a sound. That's why there's such a thing as "visual bell" among terminal emulators. Some highlight the tab title upon visual bell, Konsole merely sends a notification if a bell occurs.

----

> And/or interfere with any programs that use the beep for their own purposes?

I don't quite understand what you mean here. There isn't any way for arbitrary programs to listen for / wait for / register callbacks for the beep.

If you're thinking about the `\a` in `$PS1` ... well, PS1 is shown only when bash runs as an interactive process.

Also, the beep control in ALSA is muted by default.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: