mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Invoke :Browse if available to open URL
Example that invokes open(1) on OS X:
command! -bar -nargs=1 Browse silent! !open <args>
Closes #509.
This commit is contained in:
@@ -2147,6 +2147,8 @@ function! s:Browse(bang,line1,count,...) abort
|
||||
if a:bang
|
||||
let @* = url
|
||||
return 'echomsg '.string(url)
|
||||
elseif exists(':Browse') == 2
|
||||
return 'echomsg '.string(url).'|Browse '.string(url)
|
||||
else
|
||||
return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user