python-poetry / python-poetry/poetry-plugin-shell
Make poetry env list show the current shell too
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 141
- Forks
- 10
- Avg merge
- 59m
- Merged PRs (30d)
- 3
Description
It's confusing to me that poetry env list shows an activated environment that's different from the shell environment. I'm not entirely clear what activated means, but it would be nice to also show the current shell if any.
❯ poetry env list
cmm-tspD8tmv-py3.11
cmm-tspD8tmv-py3.12 (Activated)
❯ which python
/home/neil/.cache/pypoetry/virtualenvs/cmm-tspD8tmv-py3.11/bin/python
❯ poetry shell
Spawning shell within /home/neil/.cache/pypoetry/virtualenvs/cmm-tspD8tmv-py3.12
❯ emulate bash -c '. /home/neil/.cache/pypoetry/virtualenvs/cmm-tspD8tmv-py3.12/bin/activate'
My suggested output would show outputs like:
❯ poetry env list
cmm-tspD8tmv-py3.11 (Shell)
cmm-tspD8tmv-py3.12 (Activated)
❯ poetry env list
cmm-tspD8tmv-py3.11
cmm-tspD8tmv-py3.12 (Shell, Activated)
❯ poetry env list
cmm-tspD8tmv-py3.11
cmm-tspD8tmv-py3.12 (Activated)
I'm also not entirely sure why the shell can be different than the activated environment.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the poetry env list command and how it detects shell and activated environments. Compare the command's behavior with the three example outputs in the issue. Done means the current shell environment is labeled (Shell), including alongside (Activated) when both apply, without changing the other cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100