mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-07 12:44:39 +08: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:
1 parent
fdc8569c18
commit
32957cb552
1 file changed
+2
@@ -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