Technical Blog of Francis Setash

Cmder changing the lambda - update!

Posted on — Jan 18, 2017

So previously discussed cmder before.

However, with the newest releace of Cmder there were some file structure changes that were made that need to be updated for fixing the lambda.

For the regular cmd prompt:

<cmder_dir>\vendor\clink.lua Line number 43 and 46.

    if env == nil then
        lambda = ">" -- line  43

        lambda = "("..env..") >" -- line 46


For the PowerShell prompt:

<cmder_dir>\vendor\profile.ps1 Line number 168+. This was a bit trickier to track down; but there it is. You may want to edit this so you know when you’re in PowerShell; but its up to you.

[ScriptBlock]$Prompt = { #line 168

    $host.UI.RawUI.WindowTitle = Microsoft.PowerShell.Management\Split-Path $pwd.ProviderPath -Leaf
    PrePrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
    Microsoft.PowerShell.Utility\Write-Host " PS> " -NoNewLine -ForegroundColor "DarkGray" ### this is my edit

    PostPrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
    return " "