I have this guard in my .profile:

if [ -n "$BASH_VERSION" ]; then
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"

    if [ -f "$HOME/.bash_aliases" ]; then
        . "$HOME/.bash_aliases"

Still, I have verified the check is passing for MacVim started from Finder, not only from bash terminal, and .bashrc contains terminal related script that seems to make MacVim not work as expected when started by double click, so I must have this check failing for non-terminal executions. I'm not sure whether this affects MacVim only or just any application. I was expecting $BASH_VERSION empty for anything started from Finder.

Any tips?

  • I'd do debugging.... Id have some temp code in your .profile that dumps all env vars to a file. Then run it once as a shell, then run MacVim, see if MacVim sets something you can detect and put guard code around. – Rich Homolka Jun 17 '14 at 22:11
  • @RichHomolka I started using $TERM_PROGRAM instead of $BASH_VERSION in OS X now, this one works, tks again. – pepper_chico Jun 17 '14 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.