Skip to content
Browse files

cross-platform

  • Loading branch information...
1 parent 6ea8575 commit f1679c24d44abcae2882402f27ccf8a404fd108a adam committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 bin/tty-colour-diff
View
3 bin/tty-colour-diff
@@ -2,7 +2,8 @@
if [ -t 1 ]; then
# connected to a tty => use glorious technicolour and paging
- exec colour-diff-output | diff-less "$@"
+ # This gawk -f/which combination makes us platform-agnostic by relying on $PATH twice.
+ exec gawk -f `which colour-diff-output` | diff-less "$@"
else
# probably piping to a file, use black and white
exec cat

0 comments on commit f1679c2

Please sign in to comment.
Something went wrong with that request. Please try again.