是否可以在相同的 shell(不是 subshell)中使用 pipenv?

Is it possible to use pipenv in same shell (not subshell)?

我是 pipenv 新手。我习惯了 virtualenv,在那里我可以为 "activate" 当前 shell 中的环境提供脚本。有没有办法以这种方式使用 pipenv,而不是启动 subshell? IE。 source $(pipenv shell-env) 之类的?我想要一个线性的 shell 历史记录,而不必双击退出终端 window,等等。 我主要在 Mac 和 Windows 上使用 python 3.6 和 3.7。

在 Linux 或 macOS 上:

source "$(pipenv --venv)/bin/activate"

在 Windows 上(使用 bash;感谢@Nickolay):

source "$(pipenv --venv)/Scripts/activate"