pipenv and bash aliases

倖福魔咒の 提交于 2019-12-03 13:18:53

问题


I have a core set of bash aliases defined in my .bash_profile (Mac). But when I activate a pipenv with pipenv shell, my aliases don't work and the bash alias command returns nothing.

Is there a configuration step needed to spawn pipenv shells that inherit bash aliases from the parent shell?


回答1:


Aliases are never inherited. .bash_profile is only sourced for login shells, and pipenv apparently creates a nonlogin interactive shell. Aliases should be defined in .bashrc, and on a Mac (where terminal emulators starts login shells by default), add [[ -f ~/.bashrc ]] && source ~/.bashrc to the end of your .bash_profile.



来源:https://stackoverflow.com/questions/46416052/pipenv-and-bash-aliases

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!