From 2c46e5c382cc20bcda52c697ae1c69e06729e7ca Mon Sep 17 00:00:00 2001 From: Jiawei Li Date: Fri, 29 Jun 2018 16:54:08 +0800 Subject: [PATCH] unify shell path setting, fix mac beta version bug --- vim/settings.vim | 12 ------------ vim/settings/path.vim | 13 ++++++++----- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/vim/settings.vim b/vim/settings.vim index d117360..81c3141 100644 --- a/vim/settings.vim +++ b/vim/settings.vim @@ -13,15 +13,3 @@ for fpath in split(globpath(vimsettings, '*.vim'), '\n') exe 'source' fpath endfor - - - -if has("unix") - let s:uname = system("uname -s") - if s:uname == "Darwin" - set shell=/usr/local/bin/zsh - else - set shell=/usr/bin/zsh - endif -endif - diff --git a/vim/settings/path.vim b/vim/settings/path.vim index 867c31e..a13fa5a 100644 --- a/vim/settings/path.vim +++ b/vim/settings/path.vim @@ -1,9 +1,12 @@ " Set the shell to bash so we inherit its path, to make sure " we inherit its path. This affects :Rtags finding the right " path to homebrewed ctags rather than the XCode version of ctags -if has('win32') -elseif has('mac') - set shell=/usr/local/bin/zsh\ -l -elseif has('unix') - set shell=/usr/bin/zsh\ -l +if has("unix") + let s:uname = system("uname -s") + if s:uname =~ "Darwin" + set shell=/usr/local/bin/zsh + else + set shell=/usr/bin/zsh + endif +elseif has('win32') endif