mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-04 13:33:15 +01:00
batdiff: Support filenames with special characters
This commit is contained in:
parent
92dcb78765
commit
0acf65edde
@ -155,8 +155,8 @@ print_bat_diff() {
|
||||
|
||||
# Diff git file.
|
||||
if "$SUPPORTS_BAT_DIFF"; then
|
||||
"$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" --name-only "${files[0]}" \
|
||||
| xargs "$EXECUTABLE_BAT" --diff --diff-context="$OPT_CONTEXT" "${BAT_ARGS[@]}"
|
||||
"$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" --name-only -z "${files[0]}" \
|
||||
| xargs --null "$EXECUTABLE_BAT" --diff --diff-context="$OPT_CONTEXT" "${BAT_ARGS[@]}"
|
||||
else
|
||||
"$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" "${files[0]}" | "$EXECUTABLE_BAT" --language=diff - "${BAT_ARGS[@]}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user