我目前在 Windows 10 上的 Visual Studio Code 中使用 Bash。铃声非常烦人,我想要一个好的解决方案来禁用它(除了关闭音量或不犯任何错误......)。
在 Windows bash shell 中运行此命令:
echo "set bell-style none" >> ~/.inputrc
或手动编辑
.inputrc
,然后添加 set bell-style none
,然后重新启动打开的 bash shell 即可生效。
所选答案不适用于我的文本编辑器(Windows 10 Home 22H2)中的 Bash 终端。将其添加到
~/.bashrc
就可以了。
bind 'set bell-style none'