Windows PowerShell ISE 不提示输入 [英] Windows PowerShell ISE doesn't promt for input

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

问题描述

我使用控制台作为管理 mercurial 存储库的工具.使用经典的 cmdConsole2 我输入:

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

hg in

控制台提示类似:

D:workspacesomeproject>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 主机应用程序(您会得到图形提示以读取主机为例).

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天全站免登陆