man grep
покажет вам флаг -w
:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore.
Или придерживаться | egrep -v Jobname
в начале вашего конвейера.
Решением было изменить:
info=$(__git_info) && printf '\e[30;43m%s' "$info"
до
info=$(__git_info) && printf '\1\e[30;43m\2%s' "$info"
Это связано с тем, что bash внутренне заменяет специальные символы подсказок [ и ] на ASCII 1 и 2 перед выполнением моей __функции состояния git _.