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

Fish like abbreviations for auto expansion of aliases of command plus args #3279

Open
1 task done
nebula-it opened this issue Apr 18, 2022 · 0 comments
Open
1 task done
Labels
Issue-Enhancement It's a feature request.

Comments

@nebula-it
Copy link

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

Currently, in pwsh if you want to make alias of a command + args you need to use a function. e.g

function kgpo() { & kubectl get pods $args }

However, the issue with this is that it breaks autocomplete. To get around this, can we have something similar to what fish does with abbreviations. In pwsh, we can do

New-Abbreviation -Name kgpo -Value 'kubectl get pods'

this will simply expand the chars kgpo as soon as those are typed, i.e once you type kgpo and hit space, and then standard autocomplete will take over if you hit tab.

It was discussed in #1753 previously but that issue got closed. PowerShell/PowerShell#12962 is another one from main powershell repo but as discussed, seems like this belongs to the realm of PSReadLine.

Proposed technical implementation details (optional)

No response

@nebula-it nebula-it added the Issue-Enhancement It's a feature request. label Apr 18, 2022
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 18, 2022
@nebula-it nebula-it changed the title Fish like abbreviations for aliases of command and args Fish like abbreviations for auto expansion of aliases of command plus args Apr 18, 2022
@StevenBucher98 StevenBucher98 added this to the 2.3.0-Consider milestone Dec 21, 2022
@StevenBucher98 StevenBucher98 removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement It's a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants