In a diff the changes are marked in red and green per line.
Is there a way to mark the text changes within the line?
That would be a comparison with diff:
diff \
<(printf "same\nsame-colored changed-bold-colored same-colored\nsame") \
<(printf "same\nsame-colored CHANGED-BOLD-COLORED same-colored\nsame")
I would like an output like vimdiff or meld.
Only very simple and output directly in the terminal.
Like this output for example:
red='\033[0;31m'; redDark='\033[7;31m'; green='\033[0;32m'; greenDark='\033[7;32m'; noColor='\033[0m'
printf "${red}same-colored ${redDark}changed-bold-colored${red} same-colored${noColor}\n"
printf "${green}same-colored ${greenDark}changed-bold-colored${green} same-colored${noColor}\n"
Is this possible without much effort?

This doesn't produce the output you asked for but it's output may give you the information you need:
You do not need to be in a git repo to use that command.
Here's the same command run 3 times with the output displayed in different ways to make sure it can be seen here:
If you have the kind of problems using process substitution with
git diffas described by the OP in comments below or like this:then you could write a command like this to ensure that
git diffalways gets regular files to operate on:which you'd then call as: