我有这个命令:
Write-Host "123`r456"
独立 PowerShell 中的输出:
456
PowerShell ISE 中的输出:
123456
谢谢。
最佳答案
ISE 在很多方面的表现与普通控制台不同。虽然您希望回车符将位置重置为行的第一个字符,从而给出输出 456
,但 ISE 不会以这种方式工作,因此不要依赖于该行为。
这是 ISE 与普通控制台之间未记录的差异之一。记录的内容在这里:http://blogs.msdn.com/b/powershell/archive/2009/04/17/differences-between-the-ise-and-powershell-console.aspx
关于shell - 回车符在 PowerShell ISE 中无法按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9357052/