-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update prompt environment variable when opening shell #1642
Comments
Please try the latest pre-release (Poetry version 1.0.0b8) that has this feature, in a working state. |
I've tried the latest pre-release but it isn't working (on windows).
Windows Powershell:
Cmder
Also the cmder shell is not respected; e.g. it runs windows cmd. |
Worked great for me on MacOS/bash shell. |
It doesn't seem to work on Windows 1.0.0 to respect Powershell at all:
using activate directly:
|
This is for Cmder on Windows 10 This is supposed to be an automatic feature on Cmder in the next release.
Obviously, I need to do something here C:\Users\myUser.poetry\lib\poetry\utils
{tried adding pull path to init.bat but got another error.} |
I suspect this doesn't work on Windows because the logic that calls "activate" in |
I found a solution on Windows with AutoRun scripts. You need to update registry and add a key "Autorun" REG_SZ below Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor with the path to the script (in my case "C:\Users\ded.rc.cmd". Sample contents for this script:
|
I assume that only works if you're using |
There is a similar solution for PowerShell: https://superuser.com/a/886960/350929 |
This already works on Linux, it's only Windows where it's bypassed for some reason: #1642 (comment) |
Improved version displaying name of project: https://gist.github.com/dedale/85b603ea378caa34a397818b47ad46d9 |
I adapted this Pipenv solution to the Poetry Powershell. Add the following line to $profile file (e.g. by running
I can confirm that misconfiguring above addition did not break my Powershell. Result: |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
When running
poetry shell
you have no idea your in the virtualenv or not. Please add the virtualenv's name to the $PROMPT or $PS1 variable.The text was updated successfully, but these errors were encountered: