Shorten Your PowerShell Prompt
Recently, I’ve been getting very annoyed by the length of the default PowerShell prompt. Most of my work starts in my Documents
folder, so with the default prompt, I’m working with C:\Users\username\Documents
. But more often, it’s closer to C:\Users\username\Documents\_Projects\Project\Section\
and with some projects, even longer. Before you know it, you’re line-wrapping for anything more than running a cmdlet with no parameters.
Sure, it’s better than C:\Documents and Settings\username\My Documents
(props to Microsoft for cleaning that up in post-XP releases), but sometimes it’s still not enough.