Steven Michalske [off-list ref] writes:
On Mac OS X use the open command and the OS will use the correct viewer chosen by the user
open "$pdffile"
Unfortunately, open also exists on my system, but does not do that at
all. I'm squashing this into the next version:
--- a/contrib/latex/git-latexdiff
+++ b/contrib/latex/git-latexdiff
@@ -120,7 +120,13 @@ if [ "$old" = "" ]; then
fi
verbose "Auto-detecting PDF viewer"
-for command in xdg-open evince okular xpdf acroread; do
+candidates="xdg-open evince okular xpdf acroread"
+if [ "$(uname)" = Darwin ]; then
+ # open exists on GNU/Linux, but does not open PDFs
+ candidates="open $candidates"
+fi
+
+for command in $candidates; do
if [ "$PDFVIEWER" = "" ]; then
if command -v "$command" >/dev/null 2>&1; then
PDFVIEWER="$command"
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/