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
I think, *-competion is not the shell option. If you look what package is own some completion then you get result like this:
$ pacman -Qo /usr/share/bash-completion
/usr/share/bash-completion/ is owned by appstream 1.2.2-1
/usr/share/bash-completion/ is owned by audit 4.2.1-1
/usr/share/bash-completion/ is owned by bash-completion 2.18.0-1
/usr/share/bash-completion/ is owned by bubblewrap 0.13.1-1
/usr/share/bash-completion/ is owned by cmake 4.4.5-1
/usr/share/bash-completion/ is owned by colord 1.4.8-2
/usr/share/bash-completion/ is owned by dconf 51.0-1
/usr/share/bash-completion/ is owned by dkms 3.4.4-1
/usr/share/bash-completion/ is owned by ethtool 1:7.2-1
/usr/share/bash-completion/ is owned by fd 10.5.0-3
/usr/share/bash-completion/ is owned by gimp 3.2.6-2
/usr/share/bash-completion/ is owned by git 2.56.0-1
/usr/share/bash-completion/ is owned by glib2 2.90.1-1
/usr/share/bash-completion/ is owned by grub 2:2.16-1
/usr/share/bash-completion/ is owned by gstreamer 1.28.8-1
/usr/share/bash-completion/ is owned by gtk4 1:4.24.1-1
/usr/share/bash-completion/ is owned by hwloc 2.15.0-1
/usr/share/bash-completion/ is owned by i3lock-color 2.13.c.5-3.3
.... # and so on
It is the application developers, not the shell authors, who are responsible for preparing autocompletions for bash, fish, or zsh.
But for some reason, they ignore pwsh.
This is also something that I know Patrick Meinecke (@SeeminglyScience) & others have mentioned about wanting to look at adding more flexible "bash/git" like aliases that sorta meets at least 1 of the required parts to enable this request.
Which I think possibly makes this a duplicate of, if not at least in alignment with this issue
I think if that gets added then it very much would likely be a smaller addition in PSReadLine to support auto expansion of these new kind of aliased commands via ctrl+space but I think that only really works if there is a way to distinguish between what we have as Aliases today, and whatever it is that we call these new kinds as part of any possible implementation.
But I do think this would need the initial work in the Engine to support.
Fish like abbreviations for auto expansion of aliases of command plus args PSReadLine#3279 asks for such a faithful implementation, in which merely pressing Spacebar (to instantly expand and allow adding arguments / editing the command before submitting) or Enter (to instantly expand and submit the command) is enough (the request at hand suggests the inverse for the former, namely pressing Ctrl+Space, but in fish this key chord is the one used to suppress expansion).
That said, building on #12962is possible if the functionality is tweaked / extended, thereby potentially abandoning parity with the fish feature:
Option A, which would deviate from the fish feature: Require opt-in to expansion (as effectively suggested in the initial post), by way of a special key chord
Note, however, that using key chord Ctrl+Spacebar is not an option, because it is already bound in the default configuration (both on Windows - where it is bound to the MenuComplete function - and on Unix-like platforms, where this chord is the same as Ctrl+@ and is bound to SetMark)
Option B, which would require an additional new engine feature but could be implemented as in fish: Expand the alias object model with an optional property that indicates whether a given alias should function like a fish abbrevation, i.e. should be expanded by pressing Spacebar or Enter (with the distinct behaviors detailed above). Said property would then have to be exposed via New-Alias and Set-Alias.
Implementing #12962 and the potential additional alias property require engine support, building on them as discussed belongs in PSReadLine.
Activity
237dmitry commentedon Nov 1, 2026
How does it differ from a function?
sharpchen commentedon Nov 1, 2026
See:
PowerShell/PSReadLine#3279
PowerShell/PSReadLine#1753
237dmitry commentedon Nov 1, 2026
I think,
*-competionis not the shell option. If you look what package is own some completion then you get result like this:It is the application developers, not the shell authors, who are responsible for preparing autocompletions for bash, fish, or zsh.
But for some reason, they ignore pwsh.
doctordns commentedon Nov 1, 2026
Seems to me, an "abbreviation" is just a function by another name. And with less functionality.
I do not think this to be a hood addition yo PowerShell.
sharpchen commentedon Nov 1, 2026
Abbr is more like a code snippet when editing. The inplace expansion has different scope than a function though
mklement0 commentedon Nov 1, 2026
Good finds on the duplicates, sharpchen (@sharpchen).
To summarize:
kilasuit commentedon Nov 2, 2026
This is also something that I know Patrick Meinecke (@SeeminglyScience) & others have mentioned about wanting to look at adding more flexible "bash/git" like aliases that sorta meets at least 1 of the required parts to enable this request.
Which I think possibly makes this a duplicate of, if not at least in alignment with this issue
I think if that gets added then it very much would likely be a smaller addition in PSReadLine to support auto expansion of these new kind of aliased commands via
ctrl+spacebut I think that only really works if there is a way to distinguish between what we have as Aliases today, and whatever it is that we call these new kinds as part of any possible implementation.But I do think this would need the initial work in the Engine to support.
mklement0 commentedon Nov 3, 2026
Ryan Yates (@kilasuit): #12962 is definitely not a duplicate, and while later building on it may be an option, it couldn't be used to faithfully implement the fish shell abbreviation feature being requested:
Fish like abbreviations for auto expansion of aliases of command plus args PSReadLine#3279 asks for such a faithful implementation, in which merely pressing Spacebar (to instantly expand and allow adding arguments / editing the command before submitting) or Enter (to instantly expand and submit the command) is enough (the request at hand suggests the inverse for the former, namely pressing Ctrl+Space, but in fish this key chord is the one used to suppress expansion).
Such a faithful implementation cannot build on the extended aliases proposed in Support bash style alias's to support tab completion in command string aliases #12962, as that would be a disruptive breaking change: all aliases would then suddenly start expanding on the command line.
That said, building on #12962 is possible if the functionality is tweaked / extended, thereby potentially abandoning parity with the fish feature:
Option A, which would deviate from the fish feature: Require opt-in to expansion (as effectively suggested in the initial post), by way of a special key chord
MenuCompletefunction - and on Unix-like platforms, where this chord is the same as Ctrl+@ and is bound toSetMark)Option B, which would require an additional new engine feature but could be implemented as in fish: Expand the alias object model with an optional property that indicates whether a given alias should function like a fish abbrevation, i.e. should be expanded by pressing Spacebar or Enter (with the distinct behaviors detailed above). Said property would then have to be exposed via
New-AliasandSet-Alias.Implementing #12962 and the potential additional alias property require engine support, building on them as discussed belongs in PSReadLine.
All that said: