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
Powershell doesn't allow creating an alias called gco that performs git checkout. The fish shell offers a slightly different feature called abbreviations. When you define an abbreviation named gco, writing gco will be replaced by git checkout inside the command prompt whenever you hit enter or space. I think such feature will be a great addition to Powershell
Jason Shirk (@lzybkr) Sorry for missing your comment. I agree that having this support in PSReadLine may be better as that would enforce the abbreviation to be an interactive feature only, which is not supported in script execution.
I have captured your comment in the corresponding PS issue.
Activity
SeeminglyScience commentedon Aug 16, 2020
Related: PowerShell/PowerShell#12962
lzybkr commentedon Aug 24, 2020
It should be simple to tweak this sample to do this.
daxian-dbw commentedon Oct 5, 2020
Roey Darwish Dror (@r-darwish) This should be an enhancement to PowerShell engine, instead of in PSReadLine. You are welcome to join the discussion in PowerShell/PowerShell#12962
lzybkr commentedon Oct 5, 2020
Dongbo Wang (@daxian-dbw) IMO this is more of an editor feature (command line or other) that shouldn't require any PowerShell engine support.
daxian-dbw commentedon Nov 12, 2020
Jason Shirk (@lzybkr) Sorry for missing your comment. I agree that having this support in PSReadLine may be better as that would enforce the
abbreviationto be an interactive feature only, which is not supported in script execution.I have captured your comment in the corresponding PS issue.