mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Use open instead of osascript in help
Work around a macOS osascript bug in 10.12.5 which prevented help from working. Fixes #4035.
This commit is contained in:
parent
9236e27e86
commit
f234637e53
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue