Skip to content

Commit

Permalink
use cygstart instead of start for cygwin rather than msys2 and gitbash
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxguo committed Dec 25, 2023
1 parent 2e1c93c commit f14d170
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion autoload/go/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,15 @@ function! go#config#SnippetEngine() abort
endfunction

function! go#config#PlayBrowserCommand() abort
if go#util#IsWin() || go#util#IsCygwin()
if go#util#IsWin()
let go_play_browser_command = '!start rundll32 url.dll,FileProtocolHandler %URL%'
elseif go#util#IsCygwin()
" CYGWIN uses 'cygstart', whereas MSYS2 and GitBash uses 'start'
if system('uname') =~ 'CYGWIN'
let go_play_browser_command = '!cygstart rundll32 url.dll,FileProtoco lHandler %URL%'
else
let go_play_browser_command = '!start rundll32 url.dll,FileProtocolHa ndler %URL%'
endif
elseif go#util#IsMac()
let go_play_browser_command = 'open %URL%'
elseif executable('xdg-open')
Expand Down

0 comments on commit f14d170

Please sign in to comment.