Bash – How to turn off the beep only in bash tab-complete


I find the beep useful for some things, so I only want to turn it off for tab completion (I'm not asking how to completely turn it off, that has already been answered in a different question on Serverfault). I also don't have root access, working on RHEL5.

Best Answer

  • Readline library has bell-style variable:

    Controls what happens when Readline wants to ring the terminal bell. If set to ‘none’, Readline never rings the bell. If set to ‘visible’, Readline uses a visible bell if one is available. If set to ‘audible’ (the default), Readline attempts to ring the terminal’s bell.

    So you can put into your ~/.inputrc file following line:

     set bell-style none

    Next, run bind -f ~/.inputrc once to load it.

  • Related Question