Search code examples
gitshellunixterminalfish

Fish Shell - Init Git repo yields constant terminal output after every command


This abruptly started happening a few weeks ago. I wasn't paying much attention to when it happened so I'm not sure what commands led to this. However, it appears to only happen inside of git repos, but immediately upon cding into a git repo my shell immediately prints the following:

string match: Regular expression compile error: quantifier does not follow a repeatable item string match: * string match: ^

and continues to do so after every command, not just git commands. It also occurs when I create a new folder, initialize an empty git repo inside it, then add a single file by some means (e.g. Nano, Vim, etc.). Immediately upon saving and closing the file my terminal outputs this string match mumbo-jumbo...

I've been able to find the fish shell code that outputs this error here, but haven't been able to trace it back to anything yet. Also, if I switch back to the bash shell the issue does not reproduce.

System Info: This occurs on both of my Mac's (1 Mac Mini, 1 Macbook Pro) both running macOS Sierra.

Any help would be greatly appreciated!


Solution

  • (Posted on behalf of the OP).

    Updated my fish prompt using the fish_config editor, and the problem has been fixed!