Skip to content
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

Feature: Add completion script for powershell #9025

Merged
merged 4 commits into from
Apr 15, 2022

Conversation

frostming
Copy link
Contributor

@frostming frostming commented Oct 21, 2020

This patch adds an option --posh to pip completion and the completion works perfectly on my machine(Windows 10 and Powershell 5.1.19041.1)

Close #9024

Things need to be polished or discussed:

  • I pick a common short name --posh for Powershell, tell me if you prefer the full version: --powershell.
  • The completion may work unexpectedly if one adds more than one completion snippets(say python -m pip and pip). It is caused by the fixed name of the backup function. To overcome this, we need a unique name for each prog. As a result, we should feed a second value to the template besides prog. But since the current implementation works for most cases so I would like to ask for maintainers' opinion on this.

@frostming
Copy link
Contributor Author

/cc @pradyunsg @pfmoore

@frostming frostming force-pushed the feature/powershell-completion branch from 6252343 to 29edec5 Compare October 21, 2020 08:22
@uranusjr
Copy link
Member

Isn’t pwsh more widely recognised? But I’d prefer spelling out --powershell.

@pfmoore
Copy link
Member

pfmoore commented Oct 21, 2020

I strongly prefer --powershell.

@frostming
Copy link
Contributor Author

frostming commented Oct 21, 2020

Yes, that makes sense, already updated the option name

@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Aug 15, 2021
@pradyunsg
Copy link
Member

@frostming Any chance you could update this PR? :)

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Sep 18, 2021
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Sep 18, 2021
@frostming
Copy link
Contributor Author

@pradyunsg Sorry this has been missing from my timeline for a long time. Already rebased.

@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Sep 22, 2021
@jimbrig
Copy link

jimbrig commented Apr 14, 2022

Any updates on this feature request?

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

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

I didn’t read the autocompletion code (don’t understand Powershell autocompletion), but otherwise looks good to me.

@uranusjr uranusjr added this to the 22.1 milestone Apr 15, 2022
@pradyunsg pradyunsg merged commit 6a1ed5c into pypa:main Apr 15, 2022
@pradyunsg
Copy link
Member

Thanks @frostming! ^>^

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Powershell autocompletion
6 participants