How to Disable the Fish Shell Bell in WSL
This seems to be a “zero day” solution, as I haven’t found the correct answer anywhere else. When running Fish Shell on Windows Subsystem for Linux (WSL), the bell would sound every single time I hit enter.
Solution
Straight to the point:
- Edit
~/.config/fish/functions/fish_prompt.fish
. - Find the line
echo -n \a
. - Comment out or delete the
\a
. It should look like this:echo -n # \a
. - Save, exit, and reload Fish (exit and open a new instance).
That’s it!
Details
The \a
character is a non-printing character that sounds the bell. Windows then decides to sound the bell.
Based on this closed issue from a long time ago, I found the meaning of \a
.
I also found this post which seems to show every solution except the correct one