如何在 git 信息之后使用 posh-git 在 Cmder Powershell 中获取“Lambda”符号?

问题描述

我安装了 cmder,并将它与 Powershell 和 posh-git 一起使用。 posh-git 将 git info 放在 Lambda 之后,将光标放在 git info 之后,没有任何空格:

my prompt

如何更改此设置以在 git 信息之后显示 Lambda?我已经在 $PrePrompt 中使用了 $PostPromptconfig\user_profile.ps1,但这只会影响 git 信息之前的任何内容

解决方法

使用全局$GitPromptSettings变量在posh-git中设置提示后缀:

$GitPromptSettings.DefaultPromptSuffix = 'λ'