Visitar URL original
Allow the user to customise the columns displayed in `py list` · Issue #89 · python/pymanager · GitHub
Skip to content

Allow the user to customise the columns displayed in py list #89

Description

@pfmoore

Is your feature request related to a problem? Please describe.
I don't find the default display of py list particularly useful. The aliases take up a lot of space and aren't very helpful (they are easily deducible from the rest of the data). Ideally, I'd like to be able to choose more useful information to display in place of that column.

Describe the solution you'd like
The --format option allows you to display a single data item (--format=exe). That's fine, but it would be nice to be able to choose multiple values. Something like --format=tag,exe.

Describe alternatives you've considered
You can get this sort of report by piping --format=json into jq, or into a custom formatter, but that's fairly clumsy.

Additional context
Alternative to #86. The approach here is probably overkill, but I've filed it as an option in case changing the default format is unacceptable.

Activity

  1. zooba commented on May 12, 2025

    @zooba
    Member

    FWIW, I think changing the default format is easier than making some kind of customisable formatting language.

    Adding additional useful formats is even easier though. The only problem there is the help output becoming too long to be useful, but maybe py list -f=formats can list formats instead of installs (which would just be another format 🙃)

    tag is mostly omitted because the most useful reason for the short formats is to use e.g. py list --one -f=exe <3.13-32 to list the one best executable available for the specified filter (and probably capture it to pass to another tool, rather than for direct human consumption).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions