2014-10-22 54 views
0

我想知道是否有可能改变的PowerShell的外观,所以你必须在命令行目录线下方的一行行:更改PowerShell的外观 - 命令行下面的目录

C:\your\directory\path\will\go\here > 
$ now-a-super-long-command-can-be-entered-here 
+0

可能重复[Windows powershell:更改命令提示符](http://stackoverflow.com/questions/5725888/windows-powershell-changing-the-command-prompt) – 2014-10-22 11:37:13

回答

2

您需要修改prompt函数。

下面会做你想要什么:

function prompt { 
    Write-Host "$(Get-Location) > " 
    return "$ " 
} 

只需将其粘贴到现有的PowerShell窗口将立即启用它。如果您想永久保存,请将其添加到您的profile.ps1

This link有关于修改配置文件的信息。