From f234637e53deea68303f35c342faa8518e058bec Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 27 May 2017 23:35:18 -0700 Subject: [PATCH] Use open instead of osascript in help Work around a macOS osascript bug in 10.12.5 which prevented help from working. Fixes #4035. --- share/functions/help.fish | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index 034564cbb..2b5d33082 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -62,9 +62,14 @@ function help --description 'Show help for the fish shell' set fish_browser xdg-open end - # On OS X, we go through osascript by default + # On OS X, we use osascript < 10.12.5, and open after (see #4035) if test (uname) = Darwin - if type -q osascript + set -l version (sw_vers -productVersion | string split .) 0 0 0 + if [ $version[1] -gt 10 ] + or [ $version[1] -eq 10 -a $version[2] -gt 12 ] + or [ $version[1] -eq 10 -a $version[2] -eq 12 -a $version[3] -ge 5 ] + set fish_browser open + else set fish_browser osascript end end