Here's mine. Just has the history ID at each command so I can easily identify the ID of the command. I also use the windowtitle to give me the current working directory rather than have it displayed in the prompt itself.
106 > cat function:\prompt
$history = @(get-history)
if($history.Count -gt 0)
{
$lastItem = $history[$history.Count - 1]
$lastId = $lastItem.Id
}
$nextCommand = $lastId + 1
$Host.ui.rawui.windowtitle = "PS " + $(get-location)
$myPrompt = "$nextCommand > "
if ($NestedPromptLevel -gt 0) {$arrows = ">"*$NestedPromptLevel; $myPrompt = "PS-nested $arrows"}
Write-Host ($myPrompt) -nonewline
return " "
One thing that many people forget is to deal with in custom prompts is the nested prompt. Note that I check $nestedPromptLevel and add an arrow for each nested level.
Andy