You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Prerequisites
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
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
this will simply expand the chars
kgpo
as soon as those are typed, i.e once you typekgpo
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
The text was updated successfully, but these errors were encountered: