如何使powershell选项卡完成工作像bash [英] How to make powershell tab completion work like bash

查看:200
本文介绍了如何使powershell选项卡完成工作像bash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在目前的目录中有以下档案:

  buildBar.bat 
buildFoo.bat
buildHouse.bat

,我在命令提示符处键入以下命令:


./ bu [TAB]


TAB会将命令行扩展到


但是在Powershell(或者甚至cmd.exe),击中TAB将其展开到列表中的第一个项目:


./buildBar.bat


我更喜欢bash行为 - 是否有任何方法让powershell以这种方式工作? p>

解决方案

现在可以使用PSReadline让PowerShell做BASH风格的完成。查看 http://www.leeholmes.com/blog / 2012/09/13 / bash-like-tab-completion-in-powershell /


Let's say I have the following files in my current directory:

  buildBar.bat
  buildFoo.bat
  buildHouse.bat

and I type the following at my command prompt:

./bu [TAB]

in bash, hitting TAB would expand the command line to

./build

but in Powershell (or even cmd.exe for that matter), hitting TAB expands it to the first item in the list:

./buildBar.bat

I prefer the bash behaviour - is there any way to make powershell behave this way?

解决方案

It is now possible to get PowerShell to do BASH-style completion, using PSReadline. Check out http://www.leeholmes.com/blog/2012/09/13/bash-like-tab-completion-in-powershell/

这篇关于如何使powershell选项卡完成工作像bash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆