Advertisement
Guest User

Untitled

a guest
May 27th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function Set-WindowTitle { $global:WindowTitleOverride = [string]::Join(" ",$args) }
  2. Set-Alias -name "title" -value Set-WindowTitle
  3.  
  4. function Prompt
  5. {
  6. # Set WindowTitle to current directory name, unless overridden with Set-WindowTitle
  7. $host.ui.RawUI.WindowTitle = if ($global:WindowTitleOverride) { $global:WindowTitleOverride } else { get-location };
  8. if ($GitPromptScriptBlock) { & $GitPromptScriptBlock } # posh-git compatibility
  9. else { 'PS ' + $pwd + '> ' } # default. TODO: is it possible to chain and call the previous `Prompt` command?
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement