Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Improved sudo check.

  • Loading branch information...
commit bd8e24ded2a3e580bf184594e2e0c7e808278cee 1 parent eaf00cb
@Shougo authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 plugin/vimshell.vim
View
10 plugin/vimshell.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: vimshell.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 21 Sep 2012.
+" Last Modified: 25 Dec 2012.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -32,8 +32,12 @@ elseif v:version < 702
elseif $SUDO_USER != '' && $USER !=# $SUDO_USER
\ && $HOME !=# expand('~'.$USER)
\ && $HOME ==# expand('~'.$SUDO_USER)
- echoerr '"sudo vim" and $HOME is not same to /root are detected.'
- \.'Please use sudo.vim plugin instead of sudo command or set always_set_home in sudoers.'
+ echohl Error
+ echomsg 'vimshell disabled: "sudo vim" is detected and $HOME is set to '
+ \.'your user''s home. '
+ \.'You may want to use the sudo.vim plugin, the "-H" option '
+ \.'with "sudo" or set always_set_home in /etc/sudoers instead.'
+ echohl None
finish
endif
Please sign in to comment.
Something went wrong with that request. Please try again.