Skip to content

Feature/env var completion 1498#1707

Merged
dukecat0 merged 3 commits intopypa:mainfrom
CorentinDurand:feature/env-var-completion-1498
Jan 18, 2026
Merged

Feature/env var completion 1498#1707
dukecat0 merged 3 commits intopypa:mainfrom
CorentinDurand:feature/env-var-completion-1498

Conversation

@CorentinDurand
Copy link
Contributor

@CorentinDurand CorentinDurand commented Jan 11, 2026

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Closes #1498

Summary of changes

  • Enable shell completion for pipx environment --value by using argparse choices.
  • Include derived pipx variables in the completion list.
  • Align environment CLI tests with argparse “invalid choice” behavior.

How to use

Enable argcomplete for pipx in your shell, then run:
pipx environment --value PIPX_ # press Tab to complete available variables

Copy link
Member

@dukecat0 dukecat0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the contribution!

Copy link
Member

@dukecat0 dukecat0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dukecat0 dukecat0 force-pushed the feature/env-var-completion-1498 branch from 08da7a1 to 74e994d Compare January 18, 2026 19:26
@dukecat0 dukecat0 enabled auto-merge (squash) January 18, 2026 19:26
@dukecat0 dukecat0 merged commit f6c7940 into pypa:main Jan 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support CLI completion of environment variable names

2 participants