How to make PowerShell tab completion work like Bash

你。 提交于 2019-11-28 15:33:56

New versions of PowerShell include PSReadline, which can be used to do this:

Set-PSReadlineKeyHandler -Key Tab -Function Complete

To make it permanent, put this command into C:\Users\[User]\Documents\WindowsPowerShell\profile.ps1.

Jay Bazuzi

It is now possible to get PowerShell to do Bash-style completion, using PSReadline.

Check out blog post Bash-like tab completion in PowerShell.

CB.

Take a look here, not really your desiderata:

PowerTab

but I think is the best tab expansion feature for PowerShell console!!!

Modify the TabExpansion function to achieve what you want. Remember that perhaps it completes till the end if you press tab again the new suggestion modify from where you originally press the key. I strongly prefer the actual behaviour, I want the line writted as fast as possible. Finally don't forget the wildcard expansion, for example: bu*h[Tab] automatically completes to buildHouse.bat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!