Skip to content

Make poetry env list show the current shell too #8

Description

@NeilGirdhar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions