无法在 Pipenv 中设置别名
Can't set alias within Pipenv
我正在使用 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
?
.env
文件仅用于设置环境变量。它不是 shell 脚本,不能包含任意命令,例如 alias
.
我正在使用 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
?
.env
文件仅用于设置环境变量。它不是 shell 脚本,不能包含任意命令,例如 alias
.