【发布时间】:2019-04-21 09:16:08
【问题描述】:
我正在使用 Pipenv 来管理 Django 项目的虚拟环境。我想设置一个在我的 Pipenv 中工作的别名,以执行冗长(且经常使用)的 python 命令。
我尝试通过将以下行添加到我的 .env 文件来设置此别名:
alias launch='python manage.py collectstatic --noinput; heroku local'
但是,当我在 Pipenv 中运行新的 launch 命令时,它无法识别:
$ pipenv shell
$ launch
bash: launch: command not found
有没有办法为我的 Pipenv .env 文件添加别名,以便每次执行 pipenv shell 时加载它?
【问题讨论】: