Currently, the final foreground color in the prompt sticks around for the beginning of what the user types next. Usually, fish will try to suggest an autocomplete option (accompanied by a color change), so this isn't obvious. This will manifest if fish doesn't change the color right away, such as when the user types a valid one-letter command. I personally noticed this because I have an abbreviation g=git set; notice the green 'g' that matches the end of the prompt in the following image.
This PR fixes this issue by reseting the colors after echoing the last segment separator in prompt_finish. The bug and this PR's fix are demonstrated below by echoing a string after manually printing the prompt.
Currently, the final foreground color in the prompt sticks around for the beginning of what the user types next. Usually, fish will try to suggest an autocomplete option (accompanied by a color change), so this isn't obvious. This will manifest if fish doesn't change the color right away, such as when the user types a valid one-letter command. I personally noticed this because I have an abbreviation
g=git
set; notice the green 'g' that matches the end of the prompt in the following image.This PR fixes this issue by reseting the colors after
echo
ing the last segment separator inprompt_finish
. The bug and this PR's fix are demonstrated below byecho
ing a string after manually printing the prompt.