Feature: Add completion script for powershell#9025
Merged
Conversation
Contributor
Author
|
/cc @pradyunsg @pfmoore |
6252343 to
29edec5
Compare
Member
|
Isn’t |
Member
|
I strongly prefer |
Contributor
Author
|
Yes, that makes sense, already updated the option name |
Member
|
@frostming Any chance you could update this PR? :) |
b238343 to
de109e0
Compare
Contributor
Author
|
@pradyunsg Sorry this has been missing from my timeline for a long time. Already rebased. |
|
Any updates on this feature request? |
uranusjr
approved these changes
Apr 15, 2022
Member
uranusjr
left a comment
There was a problem hiding this comment.
I didn’t read the autocompletion code (don’t understand Powershell autocompletion), but otherwise looks good to me.
Member
|
Thanks @frostming! ^>^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds an option
--poshtopip completionand 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--poshfor Powershell, tell me if you prefer the full version:--powershell.python -m pipandpip). It is caused by the fixed name of the backup function. To overcome this, we need a unique name for eachprog. As a result, we should feed a second value to the template besidesprog. But since the current implementation works for most cases so I would like to ask for maintainers' opinion on this.