I'd like to use wdiff to compare the contents of the current buffer to a previous version of the file the buffer is visiting. So, this would be a word-level live diff of the current buffer against a given git commit. The shell version of this would look like this:
wdiff -w "[[delete:" -x "]]" -y "[[insert:" -z "]]" <(git show "9409c06d816b7c677a4b07b80b76a54d65014257:FILENAME") FILENAME
I'd like to replace the second "FILENAME" with something that pipes the contents of hte current buffer to a shell. Is this possible? The code I am currently stealing from (John Kitchin's scimax package) uses shell-command-to-string
but that chokes on the buffer string when it contains quotes & special characters.