Skip to content

Commit 1e1a116

Browse files
committed
Make sure vim-misc is installed, politely complain if it isn't
1 parent a04b3ab commit 1e1a116

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

addon-info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"vim_script_nr": 3123, "dependencies": {"vim-misc": {}}, "homepage": "http://peterodding.com/code/vim/shell", "name": "vim-shell"}

autoload/xolox/shell.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: June , 2013
3+
" Last Change: August 19, 2013
44
" URL: http://peterodding.com/code/vim/shell/
55

6-
let g:xolox#shell#version = '0.13'
6+
let g:xolox#shell#version = '0.13.1'
77

88
if !exists('s:fullscreen_enabled')
99
let s:enoimpl = "%s() hasn't been implemented on your platform! %s"

doc/shell.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ If you like the plug-in please vote for it on Vim Online [15].
294294
*shell-license*
295295
License ~
296296

297-
This software is licensed under the MIT license [16]. © 2013 Peter Odding
297+
This software is licensed under the MIT license [16]. Š 2013 Peter Odding
298298
<peter@peterodding.com>.
299299

300300
===============================================================================

plugin/shell.vim

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim plug-in
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: June 12, 2013
3+
" Last Change: August 19, 2013
44
" URL: http://peterodding.com/code/vim/shell/
55

66
" Support for automatic update using the GLVS plug-in.
@@ -11,6 +11,20 @@ if &cp || exists('g:loaded_shell')
1111
finish
1212
endif
1313

14+
" Make sure vim-misc is installed. {{{1
15+
16+
try
17+
" The point of this code is to do something completely innocent while making
18+
" sure the vim-misc plug-in is installed. We specifically don't use Vim's
19+
" exists() function because it doesn't load auto-load scripts that haven't
20+
" already been loaded yet (last tested on Vim 7.3).
21+
call type(g:xolox#misc#version)
22+
catch
23+
echomsg "Warning: The vim-shell plug-in requires the vim-misc plug-in which seems not to be installed! For more information please review the installation instructions in the readme (also available on the homepage and on GitHub). The vim-shell plug-in will now be disabled."
24+
let g:loaded_shell = 1
25+
finish
26+
endtry
27+
1428
" Configuration defaults. {{{1
1529

1630
if !exists('g:shell_fullscreen_always_on_top')

0 commit comments

Comments
 (0)