Open JaredVogt opened 8 years ago
set shell=/usr/local/bin/bash
- well, a clue. My login shell is NOT the right one - that is the OSX shell, but I am using a brew installed shell. Why? Well, to update the env SHELL=/bin/bash
requires booting into Recovery Mode and turning off System Integrity Protection.
https://www.macbartender.com/system-item-setup/
So, more steps...
Added the following chunk (from http://stackoverflow.com/questions/8841116/vim-not-recognizing-aliases-when-in-interactive-mode)
" ------------------------------------------------------------------------------
" shell Section
" ------------------------------------------------------------------------------
set shell=/usr/local/bin/bash\ --rcfile\ ~/.bash_profile
let $BASH_ENV = "~/.config/MyAliases"
This is working! At least it is accessing the aliases that are being explicitly pointed to. There is more thinking to do here - prob should move MyAliases
to a dif location.
If you want non-interactive shell (as default) but expansion of bash aliases, put your alias definitions in a file, e.g. .bash_aliases and explicitly enable alias expansion in this file:
shopt -s expand_aliases
alias la='ls -la'
Then add this to your .vimrc so the aliases file is actually read each time you run a shell command from within vim:
let $BASH_ENV = "~/.bash_aliases"
set shell=bash\ --login
- this will source .bash_profile. BUT, it is erroring out...