bash 如何在 cygwin 中关闭哔哔声?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1731700/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I turn the beep slash bell off in cygwin?
提问by Breck
The system beep/bell happens frequently (ie, when I type a few letters then type tab to autocomplete when there are a few options).
系统哔哔声/铃声经常发生(即,当我输入几个字母时,然后在有几个选项时输入 tab 以自动完成)。
How can I turn this off?
我怎样才能关闭它?
I googled it and tried:
我用谷歌搜索并尝试:
set bell-style none (the command went through but nothing changed)
and
和
setterm -blength 0 (got a bash command not found)
Thanks!
谢谢!
回答by Emerick Rogul
Add set bell-style noneto .inputrcin your home directory. You need to start a new shell for this to take effect; that may be why your test didn't work.
添加set bell-style none到.inputrc您的主目录中。您需要启动一个新的 shell 才能使其生效;这可能就是您的测试无效的原因。
回答by Steven
The default terminal minttyhas built-in options to control the terminal bell.
默认终端mintty具有用于控制终端铃声的内置选项。
- Right-click on the background and click "Options..."
- Select the "Terminal" section.
- Change the "Bell" dropdown to "none"
- 右键单击背景,然后单击“选项...”
- 选择“终端”部分。
- 将“铃声”下拉列表更改为“无”
Note: Here you can also enable or disable the visible bell (terminal flashing) and to highlight the taskbar icon on a bell ring.
注意:您还可以在此处启用或禁用可见铃铛(终端闪烁)并突出显示铃铛上的任务栏图标。
回答by James Cronen
Cut the wire to your speaker. :-)
切断扬声器的电线。:-)
回答by incircuitous
I experienced a series of beeps when I would cat a particular file. The above tips did not silence the bell. In my case, the beeps were due to bullet points that had been copy/pasted into the file. Replacing the bullets with dashes stopped the beeping.
当我抓取特定文件时,我经历了一系列的哔哔声。上述提示并没有使铃声安静下来。就我而言,哔哔声是由于已复制/粘贴到文件中的项目符号引起的。用破折号代替子弹停止了哔哔声。
回答by zombinary
Path to '.inputrc:
'.inputrc 的路径:
'C:\cygwin64\home\<username>\.inputrc
回答by ak.
Use mintty. Among many other advantages over the usual console, the bell is off by default.
使用薄荷。在与普通控制台相比的许多其他优势中,默认情况下铃声是关闭的。

