【问题标题】:pipenv and bash aliasespipenv 和 bash 别名
【发布时间】:2018-03-07 01:31:13
【问题描述】:

我在.bash_profile (Mac) 中定义了一组核心 bash 别名。但是当我使用pipenv shell 激活 pipenv 时,我的别名不起作用,并且 bash alias 命令什么也不返回。

是否需要配置步骤来生成从父 shell 继承 bash 别名的 pipenv shell?

【问题讨论】:

  • 在新外壳中获取您的.bash_profile?还有一个可选的.env 文件来加载环境...

标签: python bash pipenv


【解决方案1】:

别名永远不会被继承。 .bash_profile 仅用于登录 shell,pipenv 显然创建了一个非登录交互式 shell。别名应在.bashrc 中定义,在Mac 上(终端模拟器默认启动登录shell),将[[ -f ~/.bashrc ]] && source ~/.bashrc 添加到.bash_profile 的末尾。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2019-04-21
  • 1970-01-01
  • 2017-05-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-15
  • 2011-11-12
相关资源
最近更新 更多