]> git.nbdom.net Git - nb.git/commitdiff
vim handle multiple profile
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 31 Mar 2016 13:43:22 +0000 (15:43 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 31 Mar 2016 13:43:22 +0000 (15:43 +0200)
etc/vim/source/option.vim

index 7c93f8ef07d9c7c5ef3d1d05d330027e99678bc7..6bd80afadf60805d4958891b77addad2a3370fea 100644 (file)
@@ -29,7 +29,11 @@ set history=1000
 " NB 05.03.16   "set shellcmdflag=-c
 " NB 05.03.16   "set shell=/bin/bash\ --rcfile\ ~/.bash_profile
 " NB 05.03.16 endif
-let $BASH_ENV = "~/.profile"
+for file in ["~/.profile", "~/.bashrc", "~/.bash_profile", "~/.zshrc"]
+  if !empty(glob(file))
+    let $BASH_ENV = file
+  endif
+endfor
 " if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""