Hat allocation looks to work but commands get wonky.
Consider the following shell file that uses shfmt for formatting, which uses tabs by default:
printcurrent() {
echo "Current input: $(SwitchAudioSource -c input)"
echo "Current output: $(SwitchAudioSource -c output)"
}
The hats are correct but "take round" inside either of those shall expansions select the wrong text, most likely offset by the tab stops.