如何在 Windows 上的 Bash 中禁用铃声?

问题描述 投票:0回答:2

我目前在 Windows 10 上的 Visual Studio Code 中使用 Bash。铃声非常烦人,我想要一个好的解决方案来禁用它(除了关闭音量或不犯任何错误......)。

bash visual-studio windows-10
2个回答
22
投票

在 Windows bash shell 中运行此命令:

echo "set bell-style none" >> ~/.inputrc

或手动编辑

.inputrc
,然后添加
set bell-style none
,然后重新启动打开的 bash shell 即可生效。


0
投票

所选答案不适用于我的文本编辑器(Windows 10 Home 22H2)中的 Bash 终端。将其添加到

~/.bashrc
就可以了。

bind 'set bell-style none'
© www.soinside.com 2019 - 2024. All rights reserved.