Windows PowerShell ISE不承诺输入 [英] Windows PowerShell ISE doesn't promt for input

查看:255
本文介绍了Windows PowerShell ISE不承诺输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用控制台作为管理Mercurial资料库的工具。使用经典 cmd Console2 键入:

I am using console as my tool for managing mercurial repositories. Wtih classic cmd or Console2 I type:

hg in

并且控制台提示如下:

D:\workspace\someproject>hg in
http authorization required
realm: Bitbucket.org HTTP
user: xorty
password:

显然,我输入密码。

当我在powershell控制台中键入hg in时,它不会提示任何内容。它只是不断地说:
运行脚本/选择。按Ctrl + Break停止

But when I type "hg in" in powershell console, it doesn't prompt anything. It just keeps saying this: Running script / selection. Press Ctrl + Break to stop

我可以让PowerShell ISE像传统控制台一样运行,或者这不是PowerShell的工作方式?

Can I make PowerShell ISE behave like classic console, or this isn't the way PowerShell is meant to work?

推荐答案

PowerShell ISE确实不支持需要交互式输入的控制台应用

The PowerShell ISE indeed does not support console applications that require interactive input. The linked blog entry details options how to deal with that.

由于PowerShell ISE不是一个控制台,正常的控制台应用程序不能完成他们所使用的一切,而课程PowerShell cmdlet可以正常工作,因为几个事情依赖于PowerShell主机应用程序(例如,您获得一个图形提示与Read-Host)。

Since the PowerShell ISE is not a console, normal console applications cannot do everything they're used to, while of course PowerShell cmdlets can work just fine, since several things are dependent on the PowerShell host application (you get a graphical prompt with Read-Host, for example).

Console2模拟通过将实际控制台保持在隐藏窗口中并反复轮询它以进行更改并相应地将输入发送到该窗口来实现一个正常的控制台。

Console2 emulates a normal console by keeping the actual console around in a hidden window and polling it repeatedly for changes and, correspondingly, sending input to that window.

这篇关于Windows PowerShell ISE不承诺输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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